I am making an ios application on ipad and i am putting a iCarousel view in my application by the help of this script : http://www.theappguruz.com/tutorial/how-to-use-icarousel-view-controller-in-ios/ and when i complete all the steps and run this application on ipad it doesn't show me anything but when i run this application on iphone it works properly.
我正在ipad上制作一个ios应用程序,我在这个脚本的帮助下将iCarousel视图放在我的应用程序中:http://www.theappguruz.com/tutorial/how-to-use-icarousel-view-controller-in -ios /当我完成所有步骤并在ipad上运行此应用程序时它没有显示任何东西,但是当我在iphone上运行此应用程序时它可以正常工作。
Please help me out with this problem.
请帮我解决这个问题。
1 个解决方案
#1
Add else
code every time you find this : if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPhone)
每次发现时都添加其他代码:if(UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPhone)
so that you define the frame and views fro iPad version.
这样您就可以定义iPad版本的框架和视图。
UPDATE:
For example :
例如 :
if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPhone)
{
rec.size.width = 250;
rec.size.height = 250;
}else if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad){
rec.size.width = 500;
rec.size.height = 500;
}
#1
Add else
code every time you find this : if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPhone)
每次发现时都添加其他代码:if(UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPhone)
so that you define the frame and views fro iPad version.
这样您就可以定义iPad版本的框架和视图。
UPDATE:
For example :
例如 :
if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPhone)
{
rec.size.width = 250;
rec.size.height = 250;
}else if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad){
rec.size.width = 500;
rec.size.height = 500;
}