开发者

Table Deprecations Question [duplicate]

开发者 https://www.devze.com 2023-03-22 05:54 出处:网络
This question already has answers here: 开发者_运维百科UITableViewCell without using deprecated method initWithFrame:reuseIdentifier
This question already has answers here: 开发者_运维百科 UITableViewCell without using deprecated method initWithFrame:reuseIdentifier (3 answers) Closed 4 years ago.

I keep getting this warning with the line of code below, 'initWithFrame:reuseIdentifier:' is deprecated. Not really sure what that is referring to.

 cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];


Deprecated means that the method will soon be unavailable in the future sdk. You can always check what you should use instead by just finding this method in the docs.

initWithFrame:reuseIdentifier:
Initializes and returns a table cell object. (Deprecated in iOS 3.0. Use initWithStyle:reuseIdentifier: instead.)

This particular method was deprecated by

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号