2010

Aug

25

iPhone initWithFrame: reuseIdentifier: is deprecated的解決方法
文章分类:iPhone开发

你有受过initWithFrame: reuseIdentifier: is deprecated警告的困扰吗?在iOS3.0之后的版本不再使用这样的语法,解决方法如下:

找到如下代码:

Objective-C代码
  1. - (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIndentifier {  
  2.     [super initWithFrame:frame reuseIdentifier:reuseIdentifier];  
  3.     ...  
  4. }  

修改成:

Objective-C代码
  1. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIndentifier {  
  2.     [super initWithStyle:style reuseIdentifier:reuseIdentifier];  
  3.     ...  
  4. }  

 

本站原创,转载请标明:来自追梦博客(http://www.wuleilei.com/)

本文地址:http://www.wuleilei.com/Blog/240

相关文章

使用Three20开发iPhone相册 (2010-07-09)

iPhone开发笔记(一) (2010-07-29)

iPhone开发笔记(三) (2010-11-27)

iPhone开发之NSNotificationCenter(通知)的使用方法 (2011-04-20)

iPhone开发之第三方回调函数的使用方法 (2011-04-21)

iPhone开发之线程的使用方法 (2011-06-03)

iPhone开发之使用数组构造UITableView (2011-06-07)

iPhone开发之UITabBar与UINavigationBar共存 (2011-08-18)

无可取代 (2011-10-09)

iPhone开发之在UINavigationBar上使用UISegmentedControl制作分页按钮 (2011-10-31)

看看他们的脚印

闲言碎语

晚上和爸妈吃个饭。 (2月6日)

装修好累哟 (2月4日)

《斯巴达克斯:复仇》 (2月3日)

文章分类

最近文章

iOS开发之回调delegate的方法...

iOS开发之使用AES加密(兼容Obj...

事情好多哦

iOS开发之获取本机IP地址的方法

简单记录PC上安装苹果系统

最近评论

日志归档

友情链接

其它功能

随机标签