zoukankan      html  css  js  c++  java
  • Chapter 8 UITableView and UITableViewController

    Chapter 8 UITableView and UITableViewController 

     

    1. The designated initializer of UITableViewController is initWithStyle:, which takes a constant that determines the style of the table view. There are two options: UITableViewStylePlain and UITableViewStyleGrouped. These looked quite different on iOS6, but the differences are quite minor as of iOS7.

     

    2. A static variable is not destroyed when the method is done executing. Like a global variable, it is not kept on the stack. Static variable can be used singleton pattern.

     

    +(instancetype)sharedStore

    {

        static BNRItemStore *sharedStore = nil;

        if(!sharedStore)

        {

            sharedStore = [[self alloc] initPrivate];

        }

        return sharedStore;

    }

     

    -(instancetype)initPrivate

    {

        self = [super init];

        return self;

    }

     

    3. Using the @class directive can speed up compile times considerably because fewer files have to be recompiled when one file changes.

     

    4. To reuse UITableViewCell, the UITableViewCell should be registered to the table view firstly.

     

     

     

     

  • 相关阅读:
    计算机网络知识 第一部分
    LAMP环境安装
    Axure RP 交互设计
    Axure RP 界面功能
    Axure RP 界面功能介绍
    Axure RP 第一部分
    Grub管理修改root口令
    MYSQL 部分练习题
    工作日志示例
    计算机网络的分类
  • 原文地址:https://www.cnblogs.com/1oo1/p/3978401.html
Copyright © 2011-2022 走看看