杂记

 

设置UITableViewCell 右侧的指示箭头

UITableViewCell *cell =[[UITableViewCell alloc]init];

 cell.accessoryType =UITableViewCellAccessoryDisclosureIndicator;

 

通知的传值的实现

CityView.m

NSString *selectedCity =@"上海";

[[NSNotificationCenter defaultCenter]postNotificationName:@"ChangeCurrentCityName" object:selectedCity];

 

GoodViewController.m

  [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(receiveNotification:) name:@"ChangeCurrentCityName" object:nil];

   

-(void)receiveNotification:(NSNotification*)noti

{

  UILabel *cityNameLabel=[[UILabel alloc]initWithFrame:CGRectMake(0,0,100,100)];

    //NSLog(@"%@",noti.object);

    cityNameLabel.text=noti.object;

}

 

posted on 2015-03-29 21:01  独叹梅花瘦2015  阅读(103)  评论(0编辑  收藏  举报

导航