tableview
来源:互联网 发布:java getclassname 编辑:程序博客网 时间:2024/06/08 13:41
</pre><pre name="code" class="objc">
//// FKDetailViewController.m// SelectCellTest//// Created by yeeku on 13-6-18.// Copyright (c) 2013年 crazyit.org. All rights reserved.//#import "FKDetailViewController.h"#import "FKViewController.h"#import "FKAppDelegate.h"@interface FKDetailViewController ()@end@implementation FKDetailViewController// 定义应用程序委托对象FKAppDelegate* appDelegate;// 定义正在编辑的表格行的行号NSUInteger rowNo;- (void)viewDidLoad{[super viewDidLoad];}// 当该视图将要显示出来时调用该方法- (void)viewWillAppear:(BOOL)animated{[super viewWillAppear:animated];appDelegate = [UIApplication sharedApplication].delegate;// 获取正在编辑的表格行的行号rowNo = self.editingIndexPath.row;// 对nameField和detailField的text赋值self.nameField.text = [appDelegate.booksobjectAtIndex:rowNo];self.detailField.text = [appDelegate.detailsobjectAtIndex:rowNo];}-(IBAction)clicked:(id)sender{// 替换appDelegate的books集合中指定索引处的元素[appDelegate.books replaceObjectAtIndex:rowNowithObject:self.nameField.text];// 替换appDelegate的details集合中指定索引处的元素[appDelegate.details replaceObjectAtIndex:rowNowithObject:self.detailField.text];// 获取Storyboard文件中ID为list的视图控制器FKViewController* listController = [self.storyboardinstantiateViewControllerWithIdentifier:@"list"];// 控制程序窗口显示listController控制器appDelegate.window.rootViewController = listController;}- (IBAction)finished:(id)sender{// 让sender放弃作为第一个响应者[sender resignFirstResponder];}@end
0 0
- TableView
- TableView
- tableview
- tableview
- tableview
- TableView
- TABLEVIEW
- tableView
- tableView
- TableView
- tableview
- tableview
- tableView
- tableView
- tableView
- tableView
- TableView
- tableview
- 2015(毕业)秋季校园招聘各种企业笔试面试心得
- 【传智播客VIP用户专享】Swift教程最新更新
- hdu4691 后缀数组求lcp
- cocos2d-x 是男人就下100层 附源码
- Python宝典第五章:数据结构与算法
- tableview
- 定时同步时区时间
- POJ2524(简单并查集)
- c++ 运算符重载
- 【BZOJ1038】[ZJOI2008]瞭望塔 计算几何 半平面交/模拟退火+二分
- 报道
- 新的起点
- 青青购返利网 www.51shzyt.com:网络购物背后孕育新的商业模式
- Resource '/servers' does not exist 问题的解决