下iOS5 和iOS 4.3版本的函数差异 …
来源:互联网 发布:macd背离源码 编辑:程序博客网 时间:2024/05/16 11:22
最好的方法还是查看下iOS5和iOS 4.3版本的函数差异表。提前预防下,对于diffrentfunction进行判断下。由于比较多,就不罗列了。转载别人写好的一个。
5.0前后,对应的调用方法变了参数,而且如果用了5.0以后的方法在低版本上无法使用,而用低版本对用的方法,apple已经不提倡,现在有一种解决办法
[cpp] viewplaincopy
- AboutViewController
*mAboutViewController "AboutViewController"= [[AboutViewController alloc] initWithNibName:@ bundle:nil]; -
-
if ([self respondsToSelector:@selector(presentViewController:animated:completion:)]) { -
[self.navigationController presentViewController:mAboutViewController animated:YES completion:nil]; -
}else{ -
[self.navigationController presentModalViewControll er:mAboutViewController animated:YES]; -
} -
[mAboutViewController release]; -
mAboutViewController = nil;
在调用时判断一下
同理,dismiss时也是类似操作
[cpp] viewplaincopy
- if
([self respondsToSelector:@selector(dismissViewControllerAni mated:completion:)]) { -
[self dismissViewControllerAni mated:YES completion:nil]; -
}else{ -
[self dismissModalViewControll erAnimated:YES]; -
}
以此类推,以后碰到类似,apple高版本sdk对低版本api不再支持时,可用类似判断解决高低版本兼容问题。
- 下iOS5 和iOS 4.3版本的函数差异 …
- ios5 xcode 4.3 中 release 显示编…
- IOS 开发 loadView 和 viewDidLoad…
- LoadRunner 的 web_set_user 函数
- LoadRunner 的 web_set_user 函数
- iOS NSString, N…
- IOS Objective c 同步 异步链接 …
- matlab dist函数 …
- Xcode4 ios SDK 4.3 安装初…
- 联合早报 科学发展观下的超级…
- ios didReceiveMemoryWarning 的用…
- ++ 和 * 的优先级
- matlab 的 colormap 函数详…
- OpenGL 中常用的 GLUT 函数…
- IOS 字符串的分割 和通…
- IOS 99乘法表
- linux 下 进程和线程的…
- Join语句的on 与 select xxx in…
- 第十六章: 本地化
- [iPhone]XML文件解析 parsing-xml-…
- 320+xcode4
- 怎么将three20 加入Xcode4 中
- 在Xcode4.2 下编译发布与提交App到…
- 下iOS5 和iOS 4.3版本的函数差异 …
- iPhone开发学习笔记016——用U…
- UIApplication深入研究
- MPMoviePlayerController …
- LA 3523 - Knights of the Round Table
- xcode4.x修改工程名称
- iOS中Xcode4制作静态库全过程
- Property's synthesized get…
- 举例说明怎么简单的创建一个子线程