當前位置:編程學習大全網 - 網站源碼 - 這個界面如何用ios代碼實現?最好能寫出詳細代碼

這個界面如何用ios代碼實現?最好能寫出詳細代碼

最上面的導航欄是UINavigationControll

中間是用UITableView實現的。

最下面就是UILabel。

UITableView 的 dataSource 委托裏有

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView; 這個方法。默認是返回1,上面那個界面有兩組,是返回2.

這個方法設置每個每組裏面有兩個子項。

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section

然後用這個方法來定制每個項的內容

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;

百度壹下 UITableView 能找到很多的代碼,這裏就不復制了,自己解決問題會記得比較牢固。

  • 上一篇:小白,怎麽用VC讀取CAD的dwg文件中的數據
  • 下一篇:&是什麽符號,代表什麽
  • copyright 2024編程學習大全網