How to change the status bar background color and text color on iOS 7?

Warning: It does not work anymore with iOS 13 and Xcode 11. ======================================================================== I had to try look for other ways. Which does not involve addSubview on window. Because I am moving up the window when keyboard is presented. Objective-C – (void)setStatusBarBackgroundColor:(UIColor *)color { UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@”statusBarWindow”] valueForKey:@”statusBar”]; if ([statusBar respondsToSelector:@selector(setBackgroundColor:)]) { … Read more

iOS 7: UITableView shows under status bar

For anyone interested in replicating this, simply follow these steps: Create a new iOS project Open the main storyboard and delete the default/initial UIViewController Drag out a new UITableViewController from the Object Library Set it as the initial view controller Feed the table some test data If you follow the above steps, when you run … Read more

‘Missing recommended icon file – The bundle does not contain an app icon for iPhone / iPod Touch of exactly ‘120×120′ pixels, in .png format’

If you get an icon error when submitting an application from Xcode9, or if you cannot see app icon on your simulator as well as a device, just update your cocoapods to the latest version in your project. That issue is a bug in Xcode9 with cocoapods. There’s a new guideline for iPhoneX that can … Read more

How to Apply Gradient to background view of iOS Swift App

Xcode 11 • Swift 5.1 You can design your own Gradient View as follow: @IBDesignable public class Gradient: UIView { @IBInspectable var startColor: UIColor = .black { didSet { updateColors() }} @IBInspectable var endColor: UIColor = .white { didSet { updateColors() }} @IBInspectable var startLocation: Double = 0.05 { didSet { updateLocations() }} @IBInspectable var … Read more

Explaining difference between automaticallyAdjustsScrollViewInsets, extendedLayoutIncludesOpaqueBars, edgesForExtendedLayout in iOS7

Starting in iOS7, the view controllers use full-screen layout by default. At the same time, you have more control over how it lays out its views, and that’s done with those properties: edgesForExtendedLayout Basically, with this property you set which sides of your view can be extended to cover the whole screen. Imagine that you … Read more

@import vs #import – iOS 7

It’s a new feature called Modules or “semantic import”. There’s more info in the WWDC 2013 videos for Session 205 and 404. It’s kind of a better implementation of the pre-compiled headers. You can use modules with any of the system frameworks in iOS 7 and Mavericks. Modules are a packaging together of the framework … Read more

Cannot hide status bar in iOS7

in your apps plist file add a row call it “View controller-based status bar appearance” and set it to NO Note that this simply does not work, if you are using UIImagePickerController in the app. from http://www.openfl.org/developer/forums/general-discussion/iphone-5ios-7-cant-hide-status-bar/, mgiroux’s solution