iOS中的提醒用户及多场景(201549)
来源:互联网 发布:燕十八mysql教程 编辑:程序博客网 时间:2024/06/07 14:53
1.UIAlertView *alert;
alert=[[UIAlertView alloc] initWithTitle:@"title" message:@"Message" delegate:self cancelButtonTitle:@“OK”
otherButtonTitle:nil];
alert.alertViewStyle=UIAlertViewStylePlainTextInput;
[alert show];
alertViewStyle:四种样式
- UIAlertViewStyleDefault
- UIAlertViewStyleTextInput
- UIAlertViewStyleInput
- UIAlertViewStlyleLoginAndPasswordInput(文本框和密码文本文本框)
2.UIActionSheet:
UIActionSheet *actionSheet;
actionSheet=[[UIActionSheet alloc] initWithTitle:@"Available" delegate:self cancelButtonTitle:@"cancel" destructiveButtonTitle:@"Destroy" otherButtonTitles:@"Negotitate",@"Compromise", nil];
actionSheet.actionSheetStyle=UIActionSheetStyleDefault;
[actionSheet showFromRect:[(UIButton *)sender frame] inView:self.view animated:YES];
3.系统声音
SystemSoundID soundID;
NSString *soundFile=[[NSBundle mainBundle] pathForResource:@"XXX" ofType:@"wav"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef)[NSURL fileURLWithPath:soundFile], &soundID);
AudioServicesPlaySystemSound(soundID);
(注意:bridge前面是两个”_”)
(PS:上面列出了最最基本的东西)
4.场景是由一个视图控制器和一个视图定义的。
出口:Exit,出口可用于切换到以前的场景。
切换:切换是场景间的过渡,常使用视觉过渡效果。
关系:类似与切换,用于某些类型的视图控制器,如选项卡栏的控制器。
故事板:包含项目中的场景、切换和关系的文件。
5.切换视图:storyboardSegu设置
transiton设置:
CoverVertical:新场景从下向上移动,逐渐覆盖旧场景
Flip Horizontal:视图水平翻转,以显示背面的新场景(个人比较喜欢)
Cross Dissolve:旧场景淡出,新场景淡入
Partial Curl:旧场景像书页一样翻开,显示下面的新场景
6.main.storyBoard中的Exit按钮可以实现回退的功能,可以尝试连线,在多个ViewController之间实现回退功能。
待实践:
canPerformUnwindSegueAction:fromViewController:withSender
动态的确定视图层次结构中的视图能否成为回退切换的目标,通过覆盖这个方法,可以让视图控制器根据发起回退的视图控制器决定是否接受回退请求,进而返回Yes或No。如果返回No,发起回退的视图将继续查找。
7.设置storyBoard ID实现跳转
UIStoryboard *mainStoryboard=[UIStoryboardstoryboardWithName:@"Main" bundle:nil];
EditorViewController *editerVC=[mainStoryboardinstantiateViewControllerWithIdentifier:@"<#storyBoard ID#>"];
[selfpresentViewController:editerVC animated:YEScompletion:nil];
8.在场景中传递数据:
待实践。
prepareForSegue:sender
- iOS中的提醒用户及多场景(201549)
- iOS应用版本更新(自动提醒用户更新代码)
- IOS应用版本更新(自动提醒用户)
- iOS应用版本更新(自动提醒用户)
- iOS开发 colorWithAlphaComponent的场景及效果
- 锁定网页,提醒用户
- Android之提醒用户
- Android-用户提醒Notification
- iOS --- UIViewController中的loadView使用场景
- iOS中的多线程一般使用场景
- MD5在IOS中的应用场景
- python中的iterator介绍及应用场景
- 虚拟场景和用户故事在敏捷开发中的应用
- iOS中的用户交互userInteractionEnabled
- 【IOS游戏开发】程序中提醒用户进去App Store 评分 跳转 代码
- 多租户用户管理常用业务场景
- ios 日历 提醒
- [IOS]消息提醒--TSMessages
- 怎么把pdf文件转换成word方法分享
- SubscriptionManager 学习
- JavaScript实现导航动态效果实践
- JVM调优总结 -Xms -Xmx -Xmn -Xss
- c++字符串小函数find,substr积累
- iOS中的提醒用户及多场景(201549)
- Android DrawerLayout 高仿QQ5.2双向侧滑菜单
- php获取客户端json数据
- Lua中os库详细介绍
- OpenStack云计算快速入门教程
- 细说 iOS 消息推送
- WIN7(32位)VS2010+openCV 2.4.10+PCL 1.6.0+CUDA 6.5.14+CMake 3.2.1+SSBA-3.0配置
- 日经社説 20150409 看過できぬ株式新規公開の規律の緩み
- cocos2d-x 学习过程错误记录--Expression: animation!=nullptr