小编Moh*_*shi的帖子

需要将iOS 5.0 App转换为iOS 4.3.3

我正在iOS 5.0中开发我的应用程序,但我也想将其转换为iOS 4.3.3.

我的问题是,当我在iPhone 3GS(iOS 4.3.3)中安装我的应用程序时,我没有收到编译器警告或错误.但是,当调用iOS 5.0及更高版本支持的功能时,应用程序崩溃.目前我通过检查这样的条件管理它: -

if ([[[UIDevice currentDevice] systemVersion] floatValue]>4.4)
 {
     //Call iOS 5.0 and later function.
     //For example.
     [myTabBar setTintColor:maroonColor];
 }
 else
 {
     //Otherwise not do anything.
 }
Run Code Online (Sandbox Code Playgroud)

有没有办法轻松地将iOS 5.0应用程序转换为iOS 4.3.3.或者与最大部署目标相关的任何设置.所以我可以将它设置为4.3.3并立即获得所有错误iOS 5.0支持的功能.

ios4 ios ios5 xcode4.2

2
推荐指数
1
解决办法
590
查看次数

棘手的循环

我对C语言中的for循环问题感到困扰.

我写的时候:

#include<conio.h>
#include<stdio.h>
main()
{
    int i = 0;
    for( ; i ; )
    {
        printf("In for Loop");
    }
    getch();
}
Run Code Online (Sandbox Code Playgroud)

输出:没有打印.

代码执行,但printf语句由于条件没有打印.好的,这里没问题.

但是当我写这段代码时:

#include<conio.h>
#include<stdio.h>
main()
{
    for( ; 0 ; )
    {
        printf("In for Loop");
    }
    getch();
}
Run Code Online (Sandbox Code Playgroud)

输出:输入循环.

我的for循环执行了一次,但实际上它一定不能被执行.我不知道为什么?stackoverflow的编码器/程序员/黑客可以帮助我.请解释一下,为什么我的for循环只给出一次这个输出.

c for-loop infinite-loop

-1
推荐指数
1
解决办法
2644
查看次数

标签 统计

c ×1

for-loop ×1

infinite-loop ×1

ios ×1

ios4 ×1

ios5 ×1

xcode4.2 ×1