Translucency in uinavigationbar works in iPhone 5 but not in 4s - iphone

we have an ios7 app which runs fine on the iphone 5 so far. We have an uinavigationcontroller which uses a uinavigationbar. We set the bar to be translucent like so:
self.navigationController.navigationBar.translucent = YES;
However this does not seem to work on the iphone 4s. The bar is there but theres no translucency. I added two screenshots below to demonstrate.
The first picture is on the 5 and the second one on the 4s. Any ideas?

Are you sure it's a 4S and not a 4? (they both look the same).
The 4 doesn't support translucency but the 4S should. Check if it has Siri, hold down the home button for 5 seconds, if it has Siri then it's definitely a 4S.

Related

Tint color for ios12 system image button doesn't work

I set the tintcolor of two system image buttons via storyboard, it works perfectly in all simulators and with ios13. but if I try with real Iphone 5s with ios 12.4 the two buttons are not displayed, the only things that properly works is button background color. I tried programmaticaly with plusBtn.imageView?.tintColor = .yellow or plusBtn.tintColor = .yellow. but it's the same,it works with ios13 but not with iphone 5s.
This is iphone 11 Pro simulator:
and this is my real iphone5s device:
How can I set image tint color?
You can try setting the image programmatically but you have to remove it from Attributes inspector in storyboard :) it solved the bug in iOS 12
You have to set the .withRenderingMode property to .alwaysTemplate for tintColor to work.
plusBtn.imageView?.image?.withRenderingMode(.alwaysTemplate)

How can i design Single xib for iphone3.5,and iphone 4 inch screen (ios6 and ios7)?

I created my application as tabbar application with iphone screens. It works well earlier. Now i want to change my tabbar application to support for iphone3.5 and 4 inch screen (in ios6 and ios7). In past i have designed only single xib for this.
is it possible to support all those screens with single xib? Please help me on this.
Notes:
I have latest xcode5. I have tried autoresizing , but it is very difficult to understand. Because its work for 3.5 inch screen and 4 inch screen in ios6 but view goes out of the screen in ios7.
That's not because of the size.
In iOS7 both top and bottom bars are transparent.. That's why your views get resized and covered by the bars.
To fix this simply add this lines to your viewDidLoad method:
if ([self respondsToSelector:#selector(setEdgesForExtendedLayout:)])
self.edgesForExtendedLayout = UIRectEdgeNone;
if ([self.tabBar respondsToSelector:#selector(setTranslucent:)])
self.tabBar.translucent = NO;

Layout for iphone 4, 4s and 5 on same storyboard

I'm making an app for iphone. My layout can be the same for iphone 4, 4s, and 5 but for the iphone 4 and 4s the only thing that change is space between buttons. I finished my app and i arrange all storyboard to run well on iphone 5. Now i only have to tell that when the app running on iphone 4 and 4s i have to change the space between the buttons in some views to get all buttons inside screen. How i can do this? I can use auto layout i think but i dont use this. Its possible to help me? I do the things right, doing the design first for iphone 5 and now adapt for iphone 4 or im doing the things in the wrong way.
Regards
The IOS6 autolayout it's still a bit "wild" and it will also disable the IOS5 compatibility.
If you don't use autolayout, you can still set some rules in storyboard at size inspector, like tide you buttons to the top or the bottom of the view, so you can control where they go when the screen shrinks.
A better way is to add subviews to your view, and allow the subviews to shrink and expand (also # size inspector in storyboard). Then add your buttons to those subviews, tide them to the top, bottom, or let them untied/free if they are placed symmetrically inside the subview.
You can simulate quickly with the form factor button in storyboard (right-down corner) to see where the buttons go when you switch the sizes.
These methods require zero lines of code, but more work with the storyboard.

Application background for iOS application on both iPhone4(s) and 5

I am trying to make a GUI for my first Objective-C application. However, I am kind of stuck at the background.
I need to apply a background which'll work on both iPhone4(s) and 5. How do you do that? I guess resolutions aren't the same on the devices.
There a couple different ways of doing this. One is to create separate storyboards/xibs for each screen size. Another is to use the condition:
if([[UIScreen mainScreen] bounds].height == 568) {
//
}
Or, if your background is a pattern image you only need to apply it once and it will work on both screen sizes, it's as easy as:
[[self view] setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:#"myImage"]]];
Just create the background image for the size of the iPhone 5 and set the frame for the size of the iPhone 5 as well.
When the app is opened on the iPhone 4 it will truncate the bottom piece of the background-- it won't skew it.
If you are using Storyboards, there is a very useful button in the bottom right corner when the storyboard is open (next to the zoom buttons):
Toggling this will expand/contract your ViewControllers so you can see how it will look for both 3.5 inch (iPhone 4-4s) and 4 inch (iPhone 5) displays.

iPhone IBOutlet responds on 3.5" in simulator but not on 4" / device

this one is a weird one, I'm updating the last of my old apps for the new 4" iphone screen.
I'm finding that a bottom uitoolbar with two segmented controls respond to user interaction in the 3.5" simulator, but when I build & run it on my 4" screen & simulator nothing happens.
NO view is on top of that (I actually even added bringSubviewToFront on ViewWillAppear just to make sure)
As it's responding on the 3.5 simulator I know is not an IBOutlet connectivity problem.
I baffled to say the least, has anyone run into this when updating your apps?
Check your UIWindow's frame size in UIApplicationDelegate, may be its size is smaller (conforms to iPhone 4), you need to resize it to the new screen size of iPhone 5.
Have a look at this post too, may be its helpful for you:
iPhone 5 (4") bottom toolbar not responding