iOS UIPickerView - Appearance - ios

Is there any way to get the picker view in Xcode 6 to appear as it was in Xcode 4?
(source: timroadley.com)
(source: developpez.com)
Thank you.

As mentioned, the newer versions of iOS spot the plain-white picker view with just a focus window. To improve the aesthetics, to a look somewhat similar to the earlier versions, simply add a suitable background image to the control.

Related

What does the Swift-Icon in the Xcode 10 opening menu?

I see a new shiny Swift-Icon in the opening mode from Xcode 10 (See screenshots). Can someone clarify what function is behind that icon.
We suppose that only swift files would showed, but that is not the case. Tested with an mixed project.
Thanks in advance :)
Hamish's comment is correct. When the Swift icon is solid blue, it means Xcode will show you the compiler-generated Swift interface corresponding to the selected header file.

setTitleTextAttributes not working after view on screen. iOS 11

I've spent a whole day trying to change the colour of a UIBarButtonItem and now i'm thinking it is an iOS 11 bug unless someone can tell me it's by design.
I can change the colour of the text by using this code
[self.refreshButton setTitleTextAttributes:#{NSForegroundColorAttributeName: [UIColor orangeColor]} forState:UIControlStateNormal];
If I add the code to the viewWillAppear:animated function it works fine, however if you add it to viewDidAppear:animated it does not work.
It seems to work on the iOS 9 simulator, but not iOS 11.
Has something changed in this regard in iOS 11?
If all you want to do is change the title color of your UIBarButtonItem you can set the tintColor property instead of setTitleTextAttributes:. If you want all of your UIBarButtonItems to have the same title color you can set the tintColor of your tool/navigation bar.
I had the same issue on iOS11 but needed to set the font by setTitleTextAttributes. Unfortunately this does also not work by appearance. The only solution I found was to create new BarButtonItems as copy of the old ones and then set them as navigationItem.rightBarButtonItems.
For reference for other users having the same issue.
This Stack Overflow answer may explain why the method doesn't work.
An improper setting of UIControlState() may be the problem.

Larger search bar in iOS 11? How to opt-into new style?

I noticed that in the App Store app, the UISearchBar they're using is larger. (see attached) — Currently when I compile for iOS 11b9 using Xcode 9b6, it still uses the old style, which is too small and is clipped by the status bar.
Is there some clean way to enable/mimic this larger variant of UISearchBar, while still maintaining backwards compatibility with older iOS versions?
I did find after the iPhone X announcement (and subsequent video additions to the Developer site) that there is a bit of a workaround necessarily: https://developer.apple.com/videos/play/fall2017/201
For iOS 11+ only:
Apply the UISearchController to the "navigationItem" not the UIViewController itself. Then set it to be "active" (= true).
Ensure this hidesNavigationBarDuringPresentation is true.
Monitor the delegate callback to track when it was dismissed, and then remove it from the "navigationItem" until it's needed again.
... Honestly it seems like this was a bit of an afterthought, but it does work and is good enough for now.

UIDatePicker not displaying properly in iOS 9

I am NOT using auto layouts and this is how the UIDatePicker is appearing in my app on iOS 9. The picker is looking flawless in iOS 8 but the problem is only with iOS 9. Any idea how to resolve this.. (P.S using auto layouts in not a solution at the moment for me.)
In the viewDidLoad() method, change a property of the date picker, for example the mode. Note that, You don't have to leave it changed, you can set it to anything and then change it back to what you actually want.
I am sure, this solution is helps you.

iOS 7 3D gallery transition effect

How can I implement in iOS 7 the transition effect in the link below ?
http://www.jqueryscript.net/demo/3DGallery/index.html
Thanks!
Examine https://www.cocoacontrols.com/controls/icarousel to see how it's done - you could in fact just use this library in your code.

Resources