zoukankan      html  css  js  c++  java
  • ios 学习笔记 4

    1. 常见问题

      a,为什么创建的UIButton 点击不了,没有反应?

         原因可能是:UIView 在initWithFrame时候没有小了,超出UIWindow 区域。

      

         b, presentModalViewController动画效果

       modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

      [self dismissModalViewControllerAnimated:YES];

        c, 为什么NSDictionary的键值总是null

       初始化数字的时候最好不要直接赋值,要像这样[NSNumber numberWithInt:0 ]

        d, loadView为什么会不停的执行(循环)

        如下:

      

    - (void)loadView
    {
    HelloView *helloView=[[[HelloView alloc] init]autorelease];

    [helloView setNeedsDisplay];
    [self.view addSubview:helloView];

    }

       是因为缺少 [super loadView];

    正确的是

    - (void)loadView
    {
    [super loadView];
    HelloView *helloView=[[[HelloView alloc] init]autorelease];

    [helloView setNeedsDisplay];
    [self.view addSubview:helloView];

    }



         

  • 相关阅读:
    js 实现图片上传
    关于IOS不能使用JQUERY的ON事件
    js实现复制
    订单列表倒计时
    小程序实现倒计时
    微信小程序服务消息推送
    python爬虫七
    python爬虫六
    python爬虫五
    python爬虫四
  • 原文地址:https://www.cnblogs.com/hubj/p/2327969.html
Copyright © 2011-2022 走看看