iOS 11 - Navigation Bar loading with half height during push transition - height

Since updating from Xcode 8.3 to 9, I'm seeing this weird behaviour that during push transition the target controller's Navigation Bar is loading with half height first and then settling with correct height.
Happening on all the screens of different navigation controllers.
Tried enable/disable nav bar translucent, and Safe Area Layout Guides but of no help. Happening only on iOS 11. For new view controllers too.
Screencast showing this behaviour.

Turns out that I'm using an old version of KMNavigationBarTransition library that uses method swizzling to manage navigation bar style during push transition. Update of this library fixed the issue.

Related

SwiftUI: Status bar color for specific view

I have a specific view in my application where I need the status bar to be white (dark mode).
I've tried setting the .preferredColorScheme(.dark) but as the documentation mentions, that affects all the views in my window which is not what I'm looking for.
I've taken a look at this but it seems to be done using SceneDelgate which I am not making use of.
Is there any workaround to this?
For iOS 16, you can set .toolbarColorScheme for a specific View. Unfortunately, this is not supported on older iOS Versions. As a workaround that does not involve SceneDelegate, you could manipulate UIToolBar.appearance() directly with a new tint color. This has nothing to do with the preferred color scheme (e.g., light or dark mode), but could have the same effect.

.previewLayout(PreviewLayout.fixed(width:_,height:_)) not working in Xcode 14

Since updating to Xcode 14 the SwiftUI canvas is behaving differently.
I'm have files that are a fixed size and I am trying to preview them by adding
.previewLayout(PreviewLayout.fixed(width: width,height: height))
to the preview view.
Previously the behaviour was that I would see the canvas the expected width of view. Now I'm seeing the preview in a device.
Is there a way I can get this to work as expected again?
From Xcode 14 preview loads default in Live mode but you can change this to selectable, by clicking the second button from the bottom toolbar.

Any tooltip library for iOS that can point and highlight navigation items?

I have tried tooltip pods like AmToolTip and EasyToolTip(that can point to navigation items) but I need toolTip that covers the whole screen with a blur overlay and highlights a particular view in navigation bar ie. navigation item.
For example The overlay option of this android library Simple Tool Tip Demo does exactly what I want
Thanks.
You could use Instructions in iOS. It allows you to add customizable coach marks into your iOS project. Available for both iPhone and iPad. You can also customize its properties.
You can also refer this link for more similar libraries in both Swift and Objective C.

How do I create a slider in the GDK?

Programming the GDK a few weeks now, the CardScrollView is a pretty nice interface for displaying cards. However one issue with the UI is showing the user how far along they are in the card stack. In the Mirror API, this is nicely handled by the Slider view at the bottom of the screen as described on the Glass Design page:
https://developers.google.com/glass/design/style/metrics-grids
Unfortunately, I have not been able to get this Slider object to display on the CardScrollView and instead have resorted to a klugey 1 of n text.
Is there any way to get this Slider view to display in the GDK?
This is not yet supported by our API but is currently tracked with Issue #256.
For future reference, this feature has been already implemented as described in the original issue.
You can use the method setHorizontalScrollBarEnabled to show the bar, e.g.
mCardScrollView.setHorizontalScrollBarEnabled(true);

Cocos2d-Things appear bigger in simulator

I've recently noticed that things accommodate differently on the simulator and a real device when using Cocos2d.To make sure I did the following:
1. I created a blank Cocos2d project. In the init method I created 7 sprites from Icon-72.png(which is found in the resources folder of the Cocos2d template) and added them to the screen.In the simulator only 6.5 sprites could accommodate side-by-side whereas in the iPod touch all seven sprites could accommodate easily and almost half of the screen width remained unused.
2.Then I created a project from Single View Application template. I added the same Icon-72.png to the project. Then on the storyboard I added 6 image views and set their image property to Icon-72.png. This time I had exactly the same result with both simulator and the device.
I guess there should be some tweak as to how to fix this issue with Cocos2d because it's not Apple's fault. Do you know how to handle this?
The iPod Touch could have the retina display and the simulator wont have have it. If you need the same display as of the iPod Touch You can use the iPhone Simulator with the Retina Display and you would get the same screen. Another Option you can use is Copy and paste the Same file with -hd prefix ex:(Icon-72-hd.png) with 72x72 size and you can get the same result.
There is no problem with either the version of cocos2d or with the Apple for the issue you are facing.
I guess I do have poor explanation but you would understand my explanation.
The iPod Touch will be a retina display. Cocos2d doesn't automatically double the size of images.