I try to set UILabel as titleView using [self.navigationItem setTitleView:musicArtist]; method, but it works strange with different iOS versions. UINavigationBar is in UIPopoverController.
Here is iOS 4.3 screenshot:
As you can see it looks good. But when I switch iOS simulator at iOS 5.x I receive another result:
UILabel AutioSize settings are:
And finally If I change UILabel AutoSizing to this:
I receive this result at both iOS versions:
Where could be the problem and how to get first result at all iOS versions?
Problem solved when I've removed all AutoResizing settings.
Did you check to use the origin x and y like {0, 0}? In the screenshots you are using y=131 so when you attach it to titleView it will not show.
Related
I have successfully used the live rendering feature in Xcode 6 to show a UIView in Interface Builder.
Now I want to use live rendering with a UINavigationBar. I have tried to set it up in IB as I did with a UIView without success.
Is it possible to live render a UINavigationBar in Xcode 6, or am I missing something?
I'm trying to set the popover size of a view controller through the storyboard in iOS8. It should be noted that I'm using Obj-C, not swift, and Xcode6-Beta6.
I read the new documentation on popovers from Apple, and this post here was helpful:
How to present popover properly in iOS 8
When I set the preferredContentSize of the view controller in code before presentation, it works fine and is the correct size. However, when I try to use the storyboard properties, "Popover:Use Explicit Size" and "Simulated Size:Freeform", they don't seem to affect the size of the popover like they did in iOS7 and earlier.
Is there any way to set the size of the popover through the storyboard in iOS8?
Thank you for your time
This seems to be a bug in the Xcode6 Beta; I just got the Xcode6 GM version and all the popovers are the correct size.
Since updating to iOS 7.1, my tab bar images initialize as if they were all active, they are all highlighted on launch. Once I visit each tab, that tab image resets and displays correctly. Has anyone else seen this behavior? Suggestions for work around?
I rolled back my xcode to version 5.0, which the only old version i have and build the app using it. It works perfectly on iOS7.1 device now.
If you have the xcode version 5.0.2 that would be great also.
In my case, as I finally figured out, this issue was caused by setup of appearance protocol on UIView in my style controller which is called at startup.
I had been setting an overall tint color for UIView. It did not apply to the icons in iOS7.0 but that must have changed in 7.1.
My style code:
// Color for buttons and enabled controls
UIView *viewAppearance = [UIView appearance];
[viewAppearance setTintColor:overallTintColor];
I added this to fix:
[[UIView appearanceWhenContainedIn:[UITabBar class], nil] setTintColor:[UIColor darkGrayColor]];
darkGrayColor is not ideal, I just threw it in there for testing. I tried using nil, as I would like it to just go back to the default as it used to. Giving nil as a color did not have any effect. I suppose I will play with some color values until I get a close match.
I load two buttons in one view from the NIB.
I set this view as self.navigationItem.rightBarButtonItem in current viewController
I set actions for these buttons
Result:
Buttons work under ios6 - both simulator and device and not working on ios5 device.
Any idea to fix it?
I fixed it by set "Autosizing" in "Size inspector".
(in my case, the problem came from resize iPhone5 to iPhone4)
The problem is now solved. This was caused by setting UIViews objects in IB and then setting its class to UIButton. It should have no effect on buttons behaviour, but it had. The more wired was that it did work on iOS 6 and did not in iOS 5.
I'm migrating an App from iOS 4 to iOS 5 and I find myself stuck. Here's my problem:
I have a UIToolbar that has a UISegmentedControl within. Now, with the old App, I used all the methods of UISegmentedControl, like
[switch removeAllSegments];
but this leads to crash in the new iOS 5 because now the UISegmentedControl is automatically converted in UIBarButtonItem.
How can I solve this situation?
This may not best practice. But i think you have to add subview on UIToolbar and in that subview please add segmented controls. May it work for you.