摘要: 可以通过xib修改UINavigationController中UINavigationBar的class,但是无法从代码里进行修改,然后可以通过从xib中加载来获取这个UINavController,如果想从init方法中获取custom navBar的navController,可以在init方法里如下实现- (id)init { NSArray* objects = [[NSBundle mainBundle] loadNibNamed:@"LoginWindowController"owner:niloptions:nil]; for (id o in object 阅读全文
posted @ 2013-01-31 10:11 mahaiyan 阅读(342) 评论(0) 推荐(0)
摘要: control.contentVerticalAlignment = UIControlContentVerticalAlignmentCentertypedefenum { UIControlContentVerticalAlignmentCenter = 0, UIControlContentVerticalAlignmentTop = 1, UIControlContentVerticalAlignmentBottom = 2, UIControlContentVerticalAlignmentFill = 3,} UIControlConten... 阅读全文
posted @ 2013-01-31 10:09 mahaiyan 阅读(287) 评论(0) 推荐(0)
摘要: 1. 去除Plain的tableView下面多余的空的cell self.tableView.tableFooterView = [[[UIView alloc] initWithFrame:CGRectZerocolor:[UIColor clearColor]] autorelease];2. UITableViewFooter autoresizing无法正常生效 if (!_tableFooterView) { _tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, s... 阅读全文
posted @ 2013-01-31 10:07 mahaiyan 阅读(276) 评论(0) 推荐(0)
摘要: 要把framework的architecures中的设置,architectures和valid Architectures中的要一致,而且最好把Build Active Architecture Only 设置为NO,否则编译出来的包很可能只包含了一个architecture,如果工程中引入了其它framework,需要和主工程中的target保持一致,否则会出现莫名其妙的错误 阅读全文
posted @ 2013-01-31 10:01 mahaiyan 阅读(100) 评论(0) 推荐(0)
摘要: 这是苹果的bug,在ios6.0以后已经修复,是在开着zombies的情况下,debug才会出现的问题A:Enabling the Zombies debugging facility had side effects that changed the behavior of ARC code on some operating systems. Both iOS and OS X apps are effected. This has been fixed in iOS 6 or later and has been fixed in OS X 10.8 or later.http://de 阅读全文
posted @ 2013-01-31 09:56 mahaiyan 阅读(477) 评论(0) 推荐(0)
摘要: addChildViewController虽然是在ios5.0以后才有的方法,但是其实在5.0以下的时候,系统内部也是会调用这个方法的,在presentModalViewController时,就会调用addChildViewController,如果要支持5.0以下,并且要自己重载addChildViewController时,一定要调用 super的addChildViewController,不能只针对版本号进行判断,比如5.0以上就调用super,5.0以下就不调用,否则这样的controller presentViewController后,在5.0以下就dismiss不掉了,因为 阅读全文
posted @ 2013-01-29 16:45 mahaiyan 阅读(2402) 评论(0) 推荐(0)
摘要: C++编译不通过问题排查1.其中的C++ Language Dialect 是否设置为 Compiler DefaultC++ Standard Library 是否设置为Compiler Default2. Build Setting中 Other Linker Flags中添加 -lsdc++试试看(有的不添加也可以编译通过,有的就不行,不知道为什么,待研究) 阅读全文
posted @ 2013-01-25 15:57 mahaiyan 阅读(310) 评论(0) 推荐(0)
摘要: 首先把工程放到目录里1. 把project拉到工程中放到framworks下面,2. 在Building settings下面的Header Search Paths中添加这个framework所在的路径,如果某些头文件不是在这个路径的根目录下,就在路径里选择 recursive,那么查找头文件时就会在这个目录的子目录中也查找,否则只会查找根目录下面的3. 在Build Phases中 Link Binary With Libraries中把这个framework中的库添加进来4. 在Build Phases中Target Dependencies中添加这个framework中的库,(如果这个 阅读全文
posted @ 2012-11-27 14:28 mahaiyan 阅读(115) 评论(0) 推荐(0)