摘要:
这个问题的实质应该是在非主线程中 直接修改 界面。如果把alertView 发在主线程调用就ok了。==============非主线程[self performSelectorOnMainThread:@selector(onResp*****eInMainThread) withObject:nil waitUntilDone:YES];============= 主线程-(void)onResp*****eInMainThread{[waitingBackView removeFromSuperview];UIAlertView *alert = [[UIAlertView alloc] 阅读全文
posted @ 2013-01-24 23:58
ygm900
阅读(165)
评论(0)
推荐(0)
摘要:
[[NSString alloc] initWithFormat:@"%d",index] 和[NSString stringWithFormat:]的区别? 阅读全文
posted @ 2013-01-24 23:21
ygm900
阅读(499)
评论(0)
推荐(0)
摘要:
如果要添加一个进度条,只要先创建并设置好一个UIProgressView的实例,再利用addSubbiew方法添加到alertView中即可。在实际应用中,我可能需要在类中保存进度条的对象实例,以便更新其状态,因此先在自己的ViewController类中添加成员变量:@interface MySampleViewController : UIViewController {@private UIProgressView* progressView_;}接下来写一个叫做showProgressAlert的方法来创建并显示带有进度条的alert窗口,其中高亮的部分就是把进度条添加到alertVi 阅读全文
posted @ 2013-01-24 22:58
ygm900
阅读(1051)
评论(0)
推荐(0)
摘要:
转自:http://blog.sina.com.cn/s/blog_6647b3b601015u9o.html参考:http://www.cnblogs.com/xinye/archive/2012/12/23/2830156.html先甩两个iOS Developer Library的链接,放眼一看就知道这个东东内容灰常少,它的特点就是易学易用,可作为初学入门练习。搞懂以后慢慢学定制界面、增加功能,即使自己不重写也能看懂大神们写的SDK,挪为己用。基本使用流程是这样的: 初始化一个UIAlertView——进一步设置——显示和释放。“标准语句”↓UIAlertView *alert = [[ 阅读全文
posted @ 2013-01-24 22:45
ygm900
阅读(3124)
评论(0)
推荐(1)
摘要:
1、向系统申请的view button array 等资源一定要及时释放。尤其是img图片,更要及时释放。2、在pad点餐系统中使用如下方法释放view资源,真是太有必要了。//设置按钮状态及清空视图 -(void)clearSmallOrderList:(NSString *)code{ NSLog(@"进入OrderListViewController.m的-(void)clearSmallOrderList:(NSString *)code"); for (id obj in [self.view subviews]) { if ([obj... 阅读全文
posted @ 2013-01-24 17:25
ygm900
阅读(354)
评论(0)
推荐(0)
摘要:
不會。除非父視圖release導致其retainCount歸零從而使其自動調用dealloc方法才會使子視圖release。 阅读全文
posted @ 2013-01-24 15:46
ygm900
阅读(130)
评论(0)
推荐(0)
摘要:
释放内存的时候,一定要注意时机。一般滴,我们会在使用完某个对象之后,开始释放它的内存。如果程序调用到已经被释放的对象,程序将出现闪退。 阅读全文
posted @ 2013-01-24 15:19
ygm900
阅读(219)
评论(0)
推荐(0)
摘要:
当应用程序运行越来越慢时,可检查是否是因为应用程序对内存占用过大造成 阅读全文
posted @ 2013-01-24 14:39
ygm900
阅读(229)
评论(0)
推荐(0)
摘要:
http://blog.csdn.net/baxiaxx/article/details/7946240 阅读全文
posted @ 2013-01-24 00:33
ygm900
阅读(195)
评论(0)
推荐(0)
摘要:
第一种方法:view plain[UIView beginAnimations:@"Curl"context:nil];//动画开始 [UIView setAnimationDuration:1.25];//动画持续时间 [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];//动画速度 [UIView setAnimationTransition: UIViewAnimationTransitionCurlUp//类型 forView:self.view ... 阅读全文
posted @ 2013-01-24 00:29
ygm900
阅读(894)
评论(0)
推荐(0)