I am using this API in my application. The sample app given is working fine for both iOS7 and 6. After integrating it into my app Tap Gesture is not working on UILeftBarButtonItem in iOS 7, but working in iOS 6. Please see the screen shot below:
Both UIRightBarButtonItems are working fine and their action is getting executed but the left button is not working in iOS7
I have wasted several hours but couldn't figure out why it is not working only in iOS7. I found this thread on SO but no luck.
Any help would be greatly appreciated.
It's time to answer my question
The problem was that I was disabling the refresh button on top right corner of the Navigation Bar on start of the method it triggers and reenabling it later on the basis of subview index but some strange reason it was disabling my leftbar button but in iOs6 it was disabling the Refresh button. There is some problem with the Subview indexing in iOS7.0
I am late to answer but you made a serious mistake relying on subview index.
My approach for such a case would be
Make an IBOutlet of UIButton and add it to navigation bar.
When it comes to enable to disable I would use the outlet of button.
Hope that would help anybody else facing this problem.
Related
I have an issue with UIPickerView specifically in iOS 7. I have a picker view with 5 columns. For some columns, when the user touches any item, the PickerView doesn't scrolls to that item. The same issue is found in UIDatePickerView too. Any help is appreciated.
This blog post will shed some light on the changes to the pickerViews.
http://blog.ittybittyapps.com/blog/2013/09/20/lifting-the-lid-on-ios-7s-uipicker/
The changes to the picker architecture were significant and if you need to try to fix it, you might have to build your own picker views.
There are a number of projects on github you could use to roll your own, such as AFPickerView, https://github.com/arkichek/AFPickerView (but clearly that's not the iOS7 kind of picker)
We are started to convert our iOS 6 application into iOS 7. I tried to create one screen for my application. I used Xib file for design, I designed the screen from top to bottom with UILabel and UIButtons. When I tried to run the app in Simulator it showing differently from xib design. In simulator the designs are came down and bottom UILabel has hide.
I got the self.view.frame from viewDidLoad() was (0,64,32,504). But, it is showing correctly in viewDidAppear (0,0,320,568).
How can I resolve this issue in Xcode 5? Could you please help me to solve this.Looking forward your reply. Thanks.
You cannot depend on the frame in -viewDidLoad, because it hasn't been resized for the device at that point. You need to wait for -viewDidAppear.
I am trying to update my iPhone app to iOS7.
I am having major issues with the navigation bar. I would like it to have the new navigation bar.
As you can see from my image it has squashed the title to the top near the status bar.
I dont want to remove the status bar.
Surely it cant be that difficult to change.
I also noticed on some apps its changed automatically and on other apps it hasn't?
Did you try to add:
self.edgesForExtendedLayout = UIRectEdgeNone;
in the viewDidLoad method?
You should try and do it the correct way by adding your view controller to a UINavigationController and use its UINavigationBar. This will handle most layout issues for you and will also be backwards compatible. If you post the code where you bring your ViewController on screen, we will gladly help to wrap it in a navigation controller.
In Xcode my UIButton is centered and locked in the right place using the grids but when I run the app I'm building from a tutorial I'm following the button is slightly to the right.
Is there a quick fix for this other than shifting the button to the left in Xcode until it's centered in simulator which is pointless because the guides in Xcode are there to help so I'd like to take advantage of them and not need to do this.
Make sure you have unchecked the use Autolayout option for your Xib.
if is horizontal centered image, try like this:
ps: make sure that the parent view of the UIButton is also centered in the screen
After updating XCode I realised the issue was that XCode was launching ios simulator for 3.5inch iphone. I changed the device to iphone 4inch retina and this fixed the issue.
So I am working on an app https://github.com/Kronusdark/PerlinNoiseKit and I had a (crappy) iPhone UI going, but I decided to make it run on my iPad. The problem is that when it loads the iPad storyboard, I get a black screen. I have checked my project summary and it is pointing to the correct storyboard file. The outlets all appear to be set correctly, and it will actually run code in my viewController on my iPad. I just get no UI. I have pushed my most recent changes to my repo if anyone wants to try to run it, any advice would be helpful.
Eureka! It turns out one of my sub-views were not working properly. After I removed the offending view my storyboard loaded no problem. I believe it was due to a rogue drawRect:.