zoukankan      html  css  js  c++  java
  • iOS5.0中initWithFrame:(CGRect) reuseIdentifier:(NSString *)用法停用了。

    在ios4.3时下列用法是可行的:

    NSArray *nibfile = [[NSbound mainBundle] loadNibNames:@dcell" owner:self option:nil];

    CGRect cellFrame = CGRectMake(0,0,300,30);

    cell = [[UITableViewCell  alloc] initWithFrame:cellFrame reuseIdentifier:CellIdentifer] autorelease];

    但是在iOS5.0之后initWithFrame方法的这一形态用法被停用了,据官方文档说,现在改用initWithStyle。具体如何使用呢?

    cell = [[[UITableViewCell  alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];

    以备参考!!

  • 相关阅读:
    php utf-8
    thinkPHP--关于域名指向的问题
    PHP命名空间(Namespace)的使用详解
    thinkphp 动态配置
    枚举之称硬币
    5.7
    5.6
    5.5(OI一本通开始)
    5.4
    5.3
  • 原文地址:https://www.cnblogs.com/lovecode/p/2265188.html
Copyright © 2011-2022 走看看