activityDetailVController.m 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. //
  2. // activityDetailVController.m
  3. // ZhongJingLianMeng
  4. //
  5. // Created by youke on 2018/12/6.
  6. // Copyright © 2018 youke. All rights reserved.
  7. //
  8. #import "activityDetailVController.h"
  9. #import "UIAlertController+LY.h"
  10. #import <JavaScriptCore/JavaScriptCore.h>
  11. #import <ShareSDK/ShareSDK.h>
  12. #import <ShareSDKUI/ShareSDK+SSUI.h>
  13. #import "ZLCWebView.h"
  14. #import<ShareSDKUI/SSUIShareActionSheetStyle.h>//设置简单分享菜单样式
  15. #import "logInViewController.h"
  16. #import "UserInfoModel.h"
  17. #import "eventActivityVController.h"
  18. #import "OrderAirportPayCancelView.h"
  19. #import "joinAllianceVController.h"
  20. #import "VIPXuFeiController.h"
  21. #import "applyForDirectorController.h"
  22. @interface activityDetailVController ()<ZLCWebViewDelegate>
  23. @property (nonatomic, strong) ZLCWebView *webView;
  24. @property(nonatomic,strong) JSContext *jsContext;
  25. @property(nonatomic,strong)UIButton *collectionBtn;
  26. @property(nonatomic,strong)UIButton *sendBtn;
  27. @property (strong, nonatomic) HttpRequestManger *sessionManager;
  28. @property(nonatomic,strong)NSString *collectionStaus;
  29. @property(nonatomic,strong)UserInfoModel *userInfoModel;
  30. @property (strong, nonatomic) OrderAirportPayCancelView *cancelView;
  31. @property (strong, nonatomic) OrderAirportPayCancelView *vipContinueView;
  32. @end
  33. @implementation activityDetailVController
  34. - (HttpRequestManger*) sessionManager{
  35. if (!_sessionManager) {
  36. _sessionManager = [[HttpRequestManger alloc]init];
  37. }
  38. return _sessionManager;
  39. }
  40. -(void)viewWillAppear:(BOOL)animated{
  41. [super viewWillAppear:YES];
  42. [self loadSelectActivityStatus];
  43. [self loadIsCollection];
  44. }
  45. -(void)loadSelectActivityStatus{
  46. kWeakSelf(self);
  47. NSMutableDictionary *parma = [NSMutableDictionary dictionary];
  48. parma[@"id"] = weakself.newsId;
  49. self.sessionManager = [[HttpRequestManger alloc]init];
  50. [self.sessionManager sendPostHttpRequestWithUrl:selectActivityStatus params:parma bodyBlock:nil progress:nil success:^(NSDictionary *response) {
  51. NSLog(@"%@",response);
  52. weakself.activityStatus =[NSString stringWithFormat:@"%@", response[@"activityStatus"]];
  53. if ([weakself.activityStatus isEqualToString:@"0"]) {
  54. [weakself.sendBtn setTitle:@"活动报名" forState:UIControlStateNormal];
  55. weakself.sendBtn.userInteractionEnabled = YES;
  56. }else{
  57. [weakself.sendBtn setTitle:@"活动已结束" forState:UIControlStateNormal];
  58. weakself.sendBtn.userInteractionEnabled = NO;
  59. }
  60. } failure:^(NSError *error) {
  61. NSLog(@"%@",error);
  62. }];
  63. }
  64. -(void)loadIsCollection{
  65. kWeakSelf(self);
  66. NSMutableDictionary *parma = [NSMutableDictionary dictionary];
  67. parma[@"id"] = weakself.newsId;
  68. parma[@"type"] = @"1";
  69. self.sessionManager = [[HttpRequestManger alloc]init];
  70. [self.sessionManager sendPostHttpRequestWithUrl:isCollection params:parma bodyBlock:nil progress:nil success:^(NSDictionary *response) {
  71. weakself.collectionStaus = response[@"isCollected"];
  72. if ([weakself.collectionStaus isEqualToString:@"1"]) {
  73. [weakself.collectionBtn setImage:[UIImage imageNamed:@"collectionIng"] forState:UIControlStateNormal];
  74. [_collectionBtn setTitle:@"取消收藏" forState:UIControlStateNormal];
  75. }else{
  76. [weakself.collectionBtn setImage:[UIImage imageNamed:@"collectionNo"] forState:UIControlStateNormal];
  77. [_collectionBtn setTitle:@"收藏" forState:UIControlStateNormal];
  78. }
  79. } failure:^(NSError *error) {
  80. NSLog(@"%@",error);
  81. }];
  82. }
  83. - (void)viewDidLoad {
  84. [super viewDidLoad];
  85. [self.navigationView removeAllLeftButton];
  86. self.navigationView.titleLabel.text = self.titleStr;
  87. self.navigationView.titleLabel.textColor = [UIColor whiteColor];
  88. self.view.backgroundColor = [UIColor whiteColor];
  89. kWeakSelf(self);
  90. [self.navigationView setNavigationBackgroundColor:[UIColor colorWithHexValue:0x3C915C]];
  91. [self.navigationView addLeftButtonWithImage:[UIImage imageNamed:@"back_white"] clickCallBack:^(UIView *view) {
  92. [weakself.navigationController popViewControllerAnimated:YES];
  93. }];
  94. [self.navigationView addRightButtonWithImage:[UIImage imageNamed:@"share"] clickCallBack:^(UIView *view) {
  95. [weakself showShareView];
  96. }];
  97. UIView *bottomView = [[UIView alloc]initWithFrame:CGRectMake(0, kGScreenHeight -50, kGScreenWidth, 50)];
  98. bottomView.backgroundColor = [UIColor whiteColor];
  99. [self.view addSubview:bottomView];
  100. UIView *btnView = [[UIView alloc]init];
  101. btnView.backgroundColor = [UIColor whiteColor];
  102. [bottomView addSubview:btnView];
  103. [btnView mas_makeConstraints:^(MASConstraintMaker *make) {
  104. make.size.mas_equalTo(CGSizeMake(kGScreenWidth -264, 50));
  105. make.left.equalTo(bottomView.mas_left).offset(0);
  106. make.top.equalTo(bottomView.mas_top).offset(0);
  107. }];
  108. _collectionBtn =[UIButton buttonWithType:UIButtonTypeCustom];
  109. [_collectionBtn setImage:[UIImage imageNamed:@"collectionNo"] forState:UIControlStateNormal];
  110. [_collectionBtn setTitle:@"收藏" forState:UIControlStateNormal];
  111. _collectionBtn.titleLabel.size = CGSizeMake(30, 15);
  112. _collectionBtn.titleLabel.font = TextFont(12);
  113. [_collectionBtn setTitleColor:[UIColor colorWithHexValue:0x333333] forState:UIControlStateNormal];
  114. [_collectionBtn setImageEdgeInsets:UIEdgeInsetsMake(-10, 10, 0, 0)];
  115. [_collectionBtn setTitleEdgeInsets:UIEdgeInsetsMake(_collectionBtn.currentImage.size.height + 10, -_collectionBtn.currentImage.size.width, 0, 0)];
  116. [_collectionBtn addTarget:self action:@selector(collectionClick:) forControlEvents:UIControlEventTouchUpInside];
  117. [btnView addSubview:_collectionBtn];
  118. [_collectionBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  119. make.size.mas_equalTo(CGSizeMake(50, 50));
  120. make.centerX.mas_equalTo(btnView.mas_centerX).offset(0);
  121. make.centerY.mas_equalTo(btnView.mas_centerY).offset(0);
  122. }];
  123. _sendBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  124. // if ([self.activityStatus isEqualToString:@"0"]) {
  125. //
  126. // [_sendBtn setTitle:@"活动报名" forState:UIControlStateNormal];
  127. // _sendBtn.userInteractionEnabled = YES;
  128. // }else{
  129. //
  130. // [_sendBtn setTitle:@"活动已结束" forState:UIControlStateNormal];
  131. //
  132. // _sendBtn.userInteractionEnabled = NO;
  133. // }
  134. _sendBtn.titleLabel.size = CGSizeMake(30, 15);
  135. _sendBtn.titleLabel.font = TextFont(15);
  136. [_sendBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  137. _sendBtn.backgroundColor = [UIColor colorWithHexValue:0x3C915C];
  138. [_sendBtn addTarget:self action:@selector(OrderToClick:) forControlEvents:UIControlEventTouchUpInside];
  139. [bottomView addSubview:_sendBtn];
  140. [_sendBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  141. make.size.mas_equalTo(CGSizeMake(264, 50));
  142. make.left.equalTo(btnView.mas_right).offset(0);
  143. make.top.equalTo(bottomView.mas_top).offset(0);
  144. }];
  145. self.webView = [[ZLCWebView alloc] initWithFrame:CGRectMake(0,isFullScreen?35:20, kGScreenWidth,isFullScreen?kGScreenHeight -35 -90: kGScreenHeight-20 -70)];
  146. if (@available(iOS 11.0, *)) {
  147. self.webView.wkWebView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
  148. }else {
  149. self.automaticallyAdjustsScrollViewInsets = NO;
  150. }
  151. self.webView.delegate = self;
  152. [self.view addSubview:self.webView];
  153. [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.urlStr]]];
  154. self.webView.wkWebView.scrollView.backgroundColor = [UIColor whiteColor];
  155. self.webView.wkWebView.scrollView.showsVerticalScrollIndicator = NO;
  156. // self.webView.wkWebView.scrollView.showsHorizontalScrollIndicator = NO;
  157. _webView.wkWebView.scrollView.bounces = NO;
  158. // Do any additional setup after loading the view.
  159. }
  160. -(void)collectionClick:(UIButton *)sender{
  161. if (!IsStrEmpty([DKGlobal sharedInstance].token)) {
  162. kWeakSelf(self);
  163. if (![weakself.collectionStaus isEqualToString:@"0"]) {
  164. NSMutableDictionary *parma = [NSMutableDictionary dictionary];
  165. parma[@"id"] = weakself.newsId;
  166. parma[@"collectType"] = @"1";
  167. self.sessionManager = [[HttpRequestManger alloc]init];
  168. [self.sessionManager sendPostHttpRequestWithUrl:cancelCollection params:parma bodyBlock:nil progress:nil success:^(NSDictionary *response) {
  169. [MBProgressHUD showSuccess:@"取消收藏"];
  170. weakself.collectionStaus = @"0";
  171. [weakself.collectionBtn setImage:[UIImage imageNamed:@"collectionNo"] forState:UIControlStateNormal];
  172. [_collectionBtn setTitle:@"收藏" forState:UIControlStateNormal];
  173. } failure:^(NSError *error) {
  174. NSLog(@"%@",error);
  175. }];
  176. }else{
  177. kWeakSelf(self);
  178. NSMutableDictionary *parma = [NSMutableDictionary dictionary];
  179. parma[@"id"] = weakself.newsId;
  180. parma[@"type"] = @"1";
  181. self.sessionManager = [[HttpRequestManger alloc]init];
  182. [self.sessionManager sendPostHttpRequestWithUrl:collectionNews params:parma bodyBlock:nil progress:nil success:^(NSDictionary *response) {
  183. [MBProgressHUD showSuccess:@"收藏成功"];
  184. weakself.collectionStaus = @"1";
  185. [weakself.collectionBtn setImage:[UIImage imageNamed:@"collectionIng"] forState:UIControlStateNormal];
  186. [_collectionBtn setTitle:@"取消收藏" forState:UIControlStateNormal];
  187. } failure:^(NSError *error) {
  188. NSLog(@"%@",error);
  189. }];
  190. }
  191. }else{
  192. [MBProgressHUD showError:@"请先登录"];
  193. logInViewController *loginVC = [[logInViewController alloc]init];
  194. [self.navigationController pushViewController:loginVC animated:YES];
  195. }
  196. }
  197. - (void)zlcwebViewDidStartLoad:(ZLCWebView *)webview
  198. {
  199. [SVProgressHUD show];
  200. NSLog(@"页面开始加载");
  201. }
  202. - (void)zlcwebView:(ZLCWebView *)webview shouldStartLoadWithURL:(NSURL *)URL
  203. {
  204. NSLog(@"截取到URL:%@",URL);
  205. }
  206. - (void)zlcwebView:(ZLCWebView *)webview didFinishLoadingURL:(NSURL *)URL
  207. {
  208. [SVProgressHUD dismiss];
  209. NSLog(@"页面加载完成%@",URL);
  210. }
  211. - (void)zlcwebView:(ZLCWebView *)webview didFailToLoadURL:(NSURL *)URL error:(NSError *)error
  212. {
  213. [SVProgressHUD dismiss];
  214. NSLog(@"加载出现错误");
  215. }
  216. //}
  217. -(void)viewWillDisappear:(BOOL)animated{
  218. [super viewWillDisappear:YES];
  219. _webView = nil;
  220. [self cleanCacheAndCookie];
  221. }
  222. /**清除缓存和cookie*/
  223. - (void)cleanCacheAndCookie{
  224. //清除cookies
  225. NSHTTPCookie *cookie;
  226. NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
  227. for (cookie in [storage cookies]){
  228. [storage deleteCookie:cookie];
  229. }
  230. //清除UIWebView的缓存
  231. [[NSURLCache sharedURLCache] removeAllCachedResponses];
  232. NSURLCache * cache = [NSURLCache sharedURLCache];
  233. [cache removeAllCachedResponses];
  234. [cache setDiskCapacity:0];
  235. [cache setMemoryCapacity:0];
  236. }
  237. -(void)showShareView{
  238. NSArray *arr =@[[UIImage imageNamed:@"AppIcon"]];
  239. if (IsStrEmpty(_shareTitle)) {
  240. _shareTitle = @"";
  241. }
  242. if (arr) {
  243. if (IsStrEmpty(self.ImgUrl)){
  244. self.ImgUrl = @"https://img2018.cnblogs.com/blog/1058389/201812/1058389-20181211200433415-1810829224.png";
  245. }
  246. NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];
  247. [shareParams SSDKSetupShareParamsByText:@"中经联盟"
  248. images:self.ImgUrl
  249. url:[NSURL URLWithString:[NSString stringWithFormat:@"%@",_shareUrl]]
  250. title:_shareTitle
  251. type:SSDKContentTypeAuto];
  252. // [shareParams SSDKEnableUseClientShare];
  253. [ShareSDK showShareActionSheet:nil //要显示菜单的视图, iPad版中此参数作为弹出菜单的参照视图,只有传这个才可以弹出我们的分享菜单,可以传分享的按钮对象或者自己创建小的view 对象,iPhone可以传nil不会影响
  254. items:@[@(SSDKPlatformSubTypeWechatSession),@(SSDKPlatformSubTypeWechatTimeline)]
  255. shareParams:shareParams
  256. onShareStateChanged:^(SSDKResponseState state, SSDKPlatformType platformType, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error, BOOL end) {
  257. switch (platformType) {
  258. case SSDKPlatformSubTypeWechatSession:
  259. break;
  260. case SSDKPlatformSubTypeWechatTimeline:
  261. break;
  262. default:
  263. break;
  264. }
  265. switch (state) {
  266. case SSDKResponseStateSuccess:
  267. // {
  268. // UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"分享成功"
  269. // message:nil
  270. // delegate:nil
  271. // cancelButtonTitle:@"确定"
  272. // otherButtonTitles:nil];
  273. // [alertView show];
  274. break;
  275. // }
  276. case SSDKResponseStateFail:
  277. // {
  278. // UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"分享失败"
  279. // message:nil
  280. // delegate:nil
  281. // cancelButtonTitle:@"OK"
  282. // otherButtonTitles:nil, nil];
  283. // [alert show];
  284. //
  285. //
  286. // NSLog(@"%@",error);
  287. break;
  288. // }
  289. default:
  290. break;
  291. }
  292. }
  293. ];
  294. }
  295. }
  296. -(void)OrderToClick:(UIButton *)sender{
  297. if (![DKGlobal sharedInstance].token ) {
  298. logInViewController *control = [[logInViewController alloc] init];
  299. [self.navigationController pushViewController:control animated:YES];
  300. }else{
  301. [self isSpeicialStatus];
  302. }
  303. }
  304. - (OrderAirportPayCancelView*)cancelView{
  305. WS(weakSelf);
  306. if (!_cancelView) {
  307. _cancelView = [[NSBundle mainBundle]loadNibNamed:@"OrderAirportPayCancelView" owner:self options:nil].firstObject;
  308. _cancelView.frame = self.view.bounds;
  309. // _cancelView.isFromOrder = self.isFromOrder;
  310. _cancelView.tipLabel.hidden = YES;
  311. _cancelView.contentLabel.hidden = YES;
  312. _cancelView.titleLabel.text = @"您还未加入会员";
  313. _cancelView.titleLabelTop.constant = 35;
  314. [_cancelView.rightBtn setBackgroundColor:[UIColor colorWithHexValue:0x3C915C]];
  315. [_cancelView.leftBtn setTitle:@"继续报名" forState:UIControlStateNormal];
  316. [_cancelView.rightBtn setTitle:@"加入会员" forState:UIControlStateNormal];
  317. _cancelView.leftBtnCallback = ^{
  318. eventActivityVController *control = [[eventActivityVController alloc] init];
  319. control.activityId = weakSelf.newsId;
  320. [weakSelf.navigationController pushViewController:control animated:YES];
  321. // [weakSelf.cancelView removeFromSuperview];
  322. };
  323. _cancelView.rightBtnCallback = ^{
  324. joinAllianceVController *joinVC = [[joinAllianceVController alloc]init];
  325. joinVC.phone = weakSelf.userInfoModel.phone;
  326. joinVC.model = weakSelf.userInfoModel;
  327. [weakSelf.navigationController pushViewController:joinVC animated:YES];
  328. };
  329. }
  330. return _cancelView;
  331. }
  332. - (OrderAirportPayCancelView*)vipContinueView{
  333. WS(weakSelf);
  334. if (!_vipContinueView) {
  335. _vipContinueView = [[NSBundle mainBundle]loadNibNamed:@"OrderAirportPayCancelView" owner:self options:nil].firstObject;
  336. _vipContinueView.frame = self.view.bounds;
  337. // _cancelView.isFromOrder = self.isFromOrder;
  338. _vipContinueView.tipLabel.hidden = YES;
  339. _vipContinueView.contentLabel.hidden = YES;
  340. _vipContinueView.titleLabel.text = @"您的会员已经到期";
  341. _vipContinueView.titleLabelTop.constant = 35;
  342. [_vipContinueView.rightBtn setBackgroundColor:[UIColor colorWithHexValue:0x3C915C]];
  343. [_vipContinueView.leftBtn setTitle:@"待会再说" forState:UIControlStateNormal];
  344. [_vipContinueView.rightBtn setTitle:@"申请续费" forState:UIControlStateNormal];
  345. _vipContinueView.leftBtnCallback = ^{
  346. [weakSelf.cancelView removeFromSuperview];
  347. };
  348. _vipContinueView.rightBtnCallback = ^{
  349. if ([weakSelf.userInfoModel.level isEqualToString:@"3"]){
  350. applyForDirectorController *applyFor = [[applyForDirectorController alloc]init];
  351. applyFor.model = self.userInfoModel;
  352. [self.navigationController pushViewController:applyFor animated:YES];
  353. }else{
  354. VIPXuFeiController *control = [[VIPXuFeiController alloc] init];
  355. [weakSelf.navigationController pushViewController:control animated:YES];
  356. }
  357. };
  358. }
  359. return _vipContinueView;
  360. }
  361. -(void)isSpeicialStatus{
  362. kWeakSelf(self);
  363. [ProgressHUD show];
  364. _sessionManager =[[HttpRequestManger alloc]init];
  365. [_sessionManager sendPostHttpRequestWithUrl:getMemberInfo params:nil bodyBlock:nil progress:nil success:^(NSDictionary *response) {
  366. [ProgressHUD hide];
  367. NSLog(@"%@",response);
  368. NSDictionary *dic = [response objectForKeySafely:@"memberInfo"];
  369. weakself.userInfoModel = [UserInfoModel mj_objectWithKeyValues:dic];
  370. //判断是否会员到期
  371. if ([weakself.userInfoModel.term isEqualToString:@"2"]){
  372. UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
  373. [window addSubview: weakself.vipContinueView];
  374. }else{
  375. if ([weakself.userInfoModel.level isEqualToString:@"1"]||[weakself.userInfoModel.level isEqualToString:@"2"]||[weakself.userInfoModel.level isEqualToString:@"3"]){
  376. //是会员的话 走 loadActivityStatus 方法
  377. [self loadActivityStatus];
  378. }else{
  379. //弹窗
  380. UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
  381. [window addSubview: weakself.cancelView];
  382. }
  383. }
  384. } failure:^(NSError *error) {
  385. NSLog(@"%@",error);
  386. [ProgressHUD hide];
  387. }];
  388. }
  389. -(void)loadActivityStatus{
  390. WS(weakSelf)
  391. [ProgressHUD show];
  392. _sessionManager = [[HttpRequestManger alloc] init];
  393. NSMutableDictionary *parma = [NSMutableDictionary dictionary];
  394. parma[@"id"] = weakSelf.newsId;
  395. [self.sessionManager sendPostHttpRequestWithUrl:ActivityStatus params:parma bodyBlock:nil progress:nil success:^(NSDictionary *response) {
  396. [ProgressHUD hide];
  397. NSLog(@"%@",response);
  398. NSString *flag = [NSString stringWithFormat:@"%@",response[@"flag"]];
  399. if ([flag isEqualToString:@"0"]) {
  400. eventActivityVController *control = [[eventActivityVController alloc] init];
  401. control.activityId = weakSelf.newsId;
  402. [self.navigationController pushViewController:control animated:YES];
  403. }else if([flag isEqualToString:@"1"]){
  404. [ToastView showToast:@"已报名该活动,不能重复报名"];
  405. }else{
  406. [ToastView showToast:@"相同时间段的活动只能报名一场"];
  407. }
  408. } failure:^(NSError *error) {
  409. [ProgressHUD hide];
  410. NSLog(@"%@",error);
  411. }];
  412. }
  413. - (void)dealloc {
  414. if (_sessionManager) {
  415. [_sessionManager cancelAllTask];
  416. }
  417. DebugLog(@"%@没有造成循环引用", [self class]);
  418. }
  419. - (void)didReceiveMemoryWarning {
  420. [super didReceiveMemoryWarning];
  421. // Dispose of any resources that can be recreated.
  422. }
  423. /*
  424. #pragma mark - Navigation
  425. // In a storyboard-based application, you will often want to do a little preparation before navigation
  426. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  427. // Get the new view controller using [segue destinationViewController].
  428. // Pass the selected object to the new view controller.
  429. }
  430. */
  431. @end