-1

I am facing issue in making UIPickerView compatible with iOS 7.0.

App is working fine till iOS6.0 But pickerView and some buttons are not visible at all in iOS 7.0.

IF anyone can guide me steps that i should follow to convert my existing apps to iOS7.0.

Thanking in advance

Panky
  • 169
  • 1
  • 9
  • Refer to this first: https://developer.apple.com/library/ios/documentation/userexperience/conceptual/TransitionGuide/ – Parth Bhatt Oct 08 '13 at 09:03

2 Answers2

2
float systemVersion= [[[UIDevice currentDevice] systemVersion] floatValue];

if(systemVersion >= 7.0f)
{
  self.edgesForExtendedLayout=UIRectEdgeNone;   
}

Use this code in your viewDidLoad() method.

Jitendra
  • 5,055
  • 2
  • 22
  • 42
  • 1
    Apple suggest you detect the system version via `if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {` for iOS 7. As stated in there [iOS 7 UI Transition Guide](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TransitionGuide/SupportingEarlieriOS.html#//apple_ref/doc/uid/TP40013174-CH14-SW1). So don't use `[[UIDevice currentDevice] systemVersion]` – rckoenes Oct 08 '13 at 09:13
  • 1
    this code work only in this case if you are using navigation controller and navigation bar is visble. – Kalpesh Oct 08 '13 at 09:20
  • This helped me to display buttons but UIPicker is still not coming up. – Panky Oct 08 '13 at 12:14
  • 1
    http://stackoverflow.com/questions/18945119/uipickerview-nsattributedstring-not-available-in-ios-7 check out this link – Jitendra Oct 08 '13 at 12:37
  • How to hide status bar in iOS7.0 so that it does not interfere the screen design. – Panky Oct 20 '13 at 09:55
1

For hiding navigation Bar : USe the following code :

if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {

self.edgesForExtendedLayout=UIRectEdgeNone; }

And in For hiding StatusBar set the following property to YES in plist :-

Status bar is initially hidden

  1. As the Table View display white cells because in iOS7.0 the cell background color is white by default so just set it clear colour :

    Here is the Code :-

    • (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { [cell setBackgroundColor:[UIColor clearColor]]; }
Community
  • 1
  • 1
Panky
  • 169
  • 1
  • 9