iphone-sdk-3.2

UITableView backgroundColor always gray on iPad

隐身守侯 提交于 2019-11-27 06:04:13
When I set the backgroundColor for my UITableView it works fine on iPhone (device and simulator) but NOT on the iPad simulator. Instead I get a light gray background for any color I set including groupTableViewBackgroundColor . Steps to reproduce: Create a new navigation-based project. Open RootViewController.xib and set the table view style to "Grouped". Add this responder to the RootViewController: - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor blackColor]; } Select Simulator SDK 3.2, build and run. You will get a black background (device and simulator).

How does one get UI_USER_INTERFACE_IDIOM() to work with iPhone OS SDK < 3.2

三世轮回 提交于 2019-11-26 21:48:16
Apple advises using the following code to detect whether running on an iPad or iPhone/iPod Touch: if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { // The device is an iPad running iPhone 3.2 or later. // [for example, load appropriate iPad nib file] } else { // The device is an iPhone or iPod touch. // [for example, load appropriate iPhone nib file] } The problem is that UI_USER_INTERFACE_IDIOM() and UIUserInterfaceIdiomPad are NOT defined in the SDKs prior to 3.2. This seems to completely defeat the purpose of such a function. They can only be compiled and run on iPhone OS 3.2

Navigate to a SplitViewController

痞子三分冷 提交于 2019-11-26 18:33:23
问题 I've been playing around with the iPad SDK looking for ways to improve my current iPhone app. I've got a couple place where I think the new "SplitView" would look pretty good. My question is if it's possible to navigate to a "SplitView" with my current navigation based application? Mainly I'm not sure how to push that SplitViewController onto my current stack of views. Any thoughts? 回答1: It should always be the root controller according to Apple. The split view controller’s view should always

Is there a specific Xcode compiler flag that gets set when compiling for iPad?

ⅰ亾dé卋堺 提交于 2019-11-26 14:31:25
问题 Is there a specific Xcode compiler flag that gets set when compiling for iPad? I want to conditionally compile iPad vs iPhone/iPod Touch code for example: #ifdef TARGET_IPAD code for iPad #else code for iPhone #endif I know there is already TARGET_OS_IPHONE and TARGET_CPU_ARM in TargetConditionals.h but anything that easily and specifically targets iPad? -Rei 回答1: The correct API to use for run-time checking of iPad vs. iPhone/iPad Touch is: BOOL deviceIsPad = ([[UIDevice currentDevice]

UISplitViewController in a TabBar ( UITabBarController )?

允我心安 提交于 2019-11-26 11:54:32
问题 I am in kind of situation that I need to start with a tab based application and in that I need a split view for one or more tabs. But it seems that split view controller object can not be added to the tabbarController. (Although tabbar object can be added to the splitviewcontroller). The problem can be seen otherways: I have a full screen in the left part I have a table view when any row is selected in the table a popover should come out pointing that row. Now when any row in the popover is

UITableView backgroundColor always gray on iPad

空扰寡人 提交于 2019-11-26 11:51:08
问题 When I set the backgroundColor for my UITableView it works fine on iPhone (device and simulator) but NOT on the iPad simulator. Instead I get a light gray background for any color I set including groupTableViewBackgroundColor . Steps to reproduce: Create a new navigation-based project. Open RootViewController.xib and set the table view style to \"Grouped\". Add this responder to the RootViewController: - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor blackColor]

How does one get UI_USER_INTERFACE_IDIOM() to work with iPhone OS SDK < 3.2

删除回忆录丶 提交于 2019-11-26 08:03:41
问题 Apple advises using the following code to detect whether running on an iPad or iPhone/iPod Touch: if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { // The device is an iPad running iPhone 3.2 or later. // [for example, load appropriate iPad nib file] } else { // The device is an iPhone or iPod touch. // [for example, load appropriate iPhone nib file] } The problem is that UI_USER_INTERFACE_IDIOM() and UIUserInterfaceIdiomPad are NOT defined in the SDKs prior to 3.2. This seems to