首先确定程序在之前的版本能正常运行
1、xcode4.5程序编译报错,类似错误:
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/apple/Test/xxx/xxx.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
没有amrv7s 说明你的手机不是iphone5因此没有armv7s架构
解决办法有三个,随便哪种都能解决:
1.升级涉及到的.a文件,升级到armv7s优化架构下生成的.a
2.在target的Build Settings里面,将Build Active Architecture Only改成YES
3.在target的Build Settings里面,找到Valid Architectures,删除其中的armv7s
2、xcode 升级到了 4.5 之后 只要往xib上面拖放控件或者在真机上调试时就会报错
解决方法, 选中当前的 xib文件,在属性栏里面进行以下操作
再右边的 inspector 一栏 将 interface builder document 下的 use autolayout 复选框去掉就可以了
http://blog.163.com/zzf_soft/blog/static/13400174720127710837169/
3、
同时在响应的view中添加
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations.
return YES;
}
//ios6下选择支持代码
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
更复杂的页面加载方式参考该blog: