当前位置: 首页 > news >正文

怎么不花钱做网站外贸网站建设海外推广

怎么不花钱做网站,外贸网站建设海外推广,集团企业网站建设方案策划书,模具设计培训界面切换 push和poppresent和dismiss示例程序 push和pop 在 Objective-C 中,pop 和 push 通常是与 UINavigationController 一起使用的方法,用于控制导航栈中视图控制器的跳转和回退。 push 和 pop 通常成对使用,用于实现导航栈的前进和后退功能。当用户进入新的视图控制器时… 界面切换 push和poppresent和dismiss示例程序 push和pop 在 Objective-C 中,pop 和 push 通常是与 UINavigationController 一起使用的方法,用于控制导航栈中视图控制器的跳转和回退。 push 和 pop 通常成对使用,用于实现导航栈的前进和后退功能。当用户进入新的视图控制器时,使用 push 方法将其加入导航栈;当用户需要返回上一个视图控制器时,使用 pop 方法从导航栈中移除当前视图控制器。 push的代码格式 [self.navigationController pushViewController:two animated:YES];pop的代码格式 //返回上一视图控制器 [self.navigationController popViewControllerAnimated:YES]; //返回根视图控制器 [self.navigationController popToRootViewControllerAnimated:YES]; //返回到指定的控制器 [self.navigationController popToViewController:one animated:YES];present和dismiss 在 Objective-C 中,present 和 dismiss 是与视图控制器相关的两个重要概念,它们描述了视图控制器的呈现和关闭行为。present 用于以模态方式呈现一个新的视图控制器。dismiss 用于关闭当前模态呈现的视图控制器,返回到上一级视图控制器。 区别与联系 present 和 dismiss 是相对的概念,present 用于呈现新的视图控制器,dismiss 用于关闭当前视图控制器。通常情况下,一个视图控制器被 present 之后,需要通过 dismiss 方法来关闭自己,返回到上一级视图控制器。 示例代码 [self presentViewController:three animated:YES completion:nil];[self dismissViewControllerAnimated:YES completion:nil];示例程序 VCone.m: #import VCone.h #import VCtwo.h interface VCone ()endimplementation VCone synthesize item _item; - (void)viewDidLoad {[super viewDidLoad];self.view.backgroundColor [UIColor redColor];_item [[UIBarButtonItem alloc] initWithTitle:下一页 style:UIBarButtonItemStylePlain target:self action:selector(pressRight)];self.navigationItem.rightBarButtonItem _item; }-(void) pressRight {VCtwo* two [[VCtwo alloc] init];[self.navigationController pushViewController:two animated:YES];}/* #pragma mark - Navigation// In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {// Get the new view controller using [segue destinationViewController].// Pass the selected object to the new view controller. } */endVCtwo.m: #import VCtwo.h #import VCone.h #import VCthree.h interface VCtwo ()endimplementation VCtwo synthesize btn _btn; synthesize btn1 _btn1; - (void)viewDidLoad {[super viewDidLoad];self.view.backgroundColor [UIColor greenColor];_btn [[UIBarButtonItem alloc] initWithTitle:上一页 style:UIBarButtonItemStylePlain target:self action:selector(press)];self.navigationItem.leftBarButtonItem _btn;_btn1 [[UIBarButtonItem alloc] initWithTitle:下一页 style:UIBarButtonItemStylePlain target:self action:selector(pressright)];self.navigationItem.rightBarButtonItem _btn1; }-(void) press {[self.navigationController popViewControllerAnimated:YES]; }-(void) pressright {VCthree* three [[VCthree alloc] init];[self presentViewController:three animated:YES completion:nil]; }/* #pragma mark - Navigation// In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {// Get the new view controller using [segue destinationViewController].// Pass the selected object to the new view controller. } */end VCthree.m: #import VCthree.h #import VCtwo.h interface VCthree ()endimplementation VCthree- (void)viewDidLoad {[super viewDidLoad];// Do any additional setup after loading the view.self.view.backgroundColor [UIColor yellowColor]; }-(void) touchesBegan:(NSSetUITouch * *)touches withEvent:(UIEvent *)event {[self dismissViewControllerAnimated:YES completion:nil]; }/* #pragma mark - Navigation// In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {// Get the new view controller using [segue destinationViewController].// Pass the selected object to the new view controller. } */end 效果图
http://www.hkea.cn/news/14542151/

相关文章:

  • wordpress站点迁移今天wordpress很慢
  • 网站建设开发流程世界知名设计公司名称
  • 村建站什么部门河南有名的做网站公司
  • 广东建设公司网站wordpress建立非博客
  • 西安网站创建东软网站建设方案
  • 虎丘做网站价格做英语陪同翻译兼职的网站
  • 湖南郴州市汝城县重庆网站优化网络服务
  • 成都网站设计创新互联wordpress 企業網
  • 照片编辑在线企业网站优化做法
  • 企业网站建设的原则是网站群建设分析
  • 重庆网站建设备案简单的商城的网页设计作业
  • 广州出名的网站免费做公益网站
  • 如何选择建网站公司做互联网网站的会抓
  • 2个淘宝可以做情侣网站么网站维护主要从哪几个方面做
  • 郑州高端网站制作设计一个自己的电商网站
  • 成都游戏网站建设网站建设行业标准
  • 建设银行网站是什么网店设计与装修实训报告
  • 六安市建设网站市场信息价网站seo如何做
  • 网站300m空间跨境一件代发平台
  • 哪个网站可以做微信推送爱做网站视频
  • 网站做拓扑图编辑wordpress 重置管理员密码
  • 大连免费建站模板手机如何制作自己的网站
  • 淄博做企业网站哪家好南充网站建设制作
  • 企业营销型网站推广方法四川电子有限公司 - 手机网站
  • 镇江市住房城乡建设局网站wordpress评论ip
  • wordpress新闻是哪个表常用的seo查询工具有哪些
  • 科技企业网站建设专注昆明网站建设
  • 任丘市网站建设创新的成都网站建设
  • iis7 网站404错误信息最新新闻事件今天新闻联播
  • 无锡网站建设seowordpress 搭建app