下载此文档

简单的页面跳转和传值..docx


文档分类:IT计算机 | 页数:约16页 举报非法文档有奖
1/16
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/16 下载此文档
文档列表 文档介绍
#import <UIKit/>
***@interface ContactViewController : UITableViewController
***@end
#import ""
#import ""                    //人的模型
#import ""                  //男
#import ""                //女
#import ""            //跳转页面
***@interface ContactViewController ()
***@property (nonatomic,retain)NSMutableDictionary *dataSource;
***@property (nonatomic,retain)NSMutableArray *orderAry;
***@property (nonatomic,copy)NSString *str;                 //传哪个值
***@end
***@implementation ContactViewController
- (NSMutableDictionary *)dataSource{
    if (!_dataSource) {
        = [NSMutableDictionary dictionary];
    }
    return [[_dataSource retain] autorelease];
}
- (NSString *)str{
    if (!_str) {
        = @"name";
    }
    return [[_str retain] autorelease];
}
- (NSMutableArray *)orderAry{
    if (!_orderAry) {
        = [NSMutableArray array];
    }
    return [[_orderAry retain] autorelease];
}
- (void)viewDidLoad {
    [super viewDidLoad];
   
    // ment the following line to preserve selection between presentations.
    // = NO;
   
    // ment the following line to display an Edit button in the navigation bar for this view controller.
    // = ;
   
    [self readDataPlist];
   
}
- (IBAction)handleSegment:(UISegmentedControl *)sender {
    = [sender titleForSegmentAtIndex:];
}
- (void)readDataPlist{
    NSString *path = [[NSBundle mainBundle] pathForResource:@"yingxiong" ofType:@"plist"];
   
    NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
   
    for (NSString *str in dict) {
        NSMutableArray *mArray = [NSMutableArray array];
        for (NSDictionary *aHeros in dict[str]) {
            Person *person = [[Person alloc] initWithName:aHeros];
            [mArray

简单的页面跳转和传值. 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数16
  • 收藏数0 收藏
  • 顶次数0
  • 上传人q1188830
  • 文件大小83 KB
  • 时间2018-05-14