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

湖州市吴兴区建设局网站2023能用的磁力搜索引擎

湖州市吴兴区建设局网站,2023能用的磁力搜索引擎,手机排行榜最新,全国定制网站服务器云主机界面切换 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.w-s-a.com/news/656673/

相关文章:

  • 乐山 网站建设安阳给商家做网站推广
  • 网站空间一般多大邢台网站建设有哪些
  • h5网站开发工具有哪些wordpress清空post表
  • 公司开网站干嘛怎么制作一个免费的网站模板
  • 群晖wordpress搭建网站网站建设及管理
  • 中山企业网站建设公司抖音代运营合作模式
  • 南通营销网站开发做网站页面多少钱
  • 桂林生活网官方网站云主机和云电脑的区别
  • 内部网络网站怎么做vue做单页面网站
  • 如何建立网站教程wordpress粘帖图片
  • 广东网站备案要多久网站开发 pdf 文字版
  • 学校网站方案帮别人做钓鱼网站吗
  • 如何加强网站建设和信息宣传wordpress 搜索提示
  • 灰色网站怎么做php yaf 网站开发框架
  • 浙江建设网站首页提供做网站公司有哪些
  • 建公司网站报价公司seo是什么级别
  • 可信赖的武进网站建设中山网站建设方案
  • 网站设计方面有什么公司运动鞋网站建设目的
  • 学校门户网站流程建设方案找人做网站 多少钱
  • 网站域名更换相应内容网站策划 要求
  • 百盛联合建设集团网站开发网站的步骤
  • php做网站评价网络公司经营范围可以加技
  • 网站积分的作用保定专业网站建设
  • 莆田做网站公司电话如何提升网站访问速度
  • 网站开发流程步骤 口袋网页访问wordpress
  • 湘潭做网站的公司自助建站教程
  • 做网站推广和头条推广wordpress 验证密码错误
  • 淘宝联盟网站怎么做深圳市创想三维科技有限公司
  • 校园网站建设招标公告php网站开发什么
  • 06628 网页制作与网站开发陕西省交通建设网站