When using the NavigationView in SwiftUI, it creates lots of unexpected behavior when sliding down on the navigation bar to when it would collapse. I am using a search bar as well(searchable directly on the List). I am unsure what is causing this but it may have to do with having sections on my List.
Here is some source code that works for me. I am running this on a real iPhone and it creates this behavior.
https://utilities.awesomeplayer.tech/send/f.php?h=1I-fJPHl&p=1
UPDATE! I found the answer to this and that this is caused by adding .animation() to the SwiftUI List itself. While this does give a nice animation and controls the animation while updating, deleting, etc., it controls the animations of the whole navigation bar itself as well. I found this by tweaking the duration part of `.animation(.default(duration: 1)) to four and noticing a noticeable difference in how it slides down: it slides down slower.
There is a warning I was ignoring from Xcode complaining about a deprecation. After some research, I replaced it with .animation(.default, value: UUID()) and that seemed to work perfectly.
Related
I've run into a warning for CLKComplicationTemplateGraphicExtraLargeCircularView:
The 'content' view on
TtGC17_ClockKit_SwiftUI52CLKComplicationTemplateGraphicExtraLargeCircularViewV21Target21GraphicExtraLargeView
took more than two frames to render. This template will be removed
from the timeline.
This certainly issues my app from time to time, so bug needs to be caught.
Please help if you've seen something similar. Thanks!
not sure when storyboard convert views like this. I re-installed xcode. but no luck. Xcode version is 8.3.2 (8E2002). How do I get previous view.
thanks
Open storyboard and then go to Editor -> Canvas -> Show Bounds Rectangle and uncheck it.
It looks like the storyboard content is not getting properly rendered. You can try opening a smaller storyboard and see if the content is rendering properly to know whether it is specific to this larger storyboard.
If a smaller storyboard works, try to isolate the issue in your larger storyboard by temporarily removing scenes and reopening the storyboard. Sometimes these rendering issues can be caused by a particular scene configuration.
The report a bug banner button at the top-right may provide some logs giving clues to the issue. Feel free to send those to the Apple Bug Reporter
I'm building a nested navigation bar, here is the jsFiddle:
http://jsfiddle.net/3Y8vB/1/
the nested menus are on the third item, "Collezioni": so far so good. But adding Cufon triggers a strange problem: "hovering" the nested menus and going away from them all the way down, the "Collezioni" link disappears!
http://jsfiddle.net/3Y8vB/2/
Well, it doesn't really disappear: it retains the #fff color (:hover) instead of going back to #111 (normal state), and since the background is white too, it "disappears". Going all the way UP (without "hovering" the nested menus) has no problem.
I'm sure it's a Cufon related problem since the first version (without Cufon) is working nice.
Please, can you help to solve this? Thanks in advance
Ok, found the solution here:
https://github.com/sorccu/cufon/wiki/FAQ#wiki-faq-10
And here's the new jsFiddle:
http://jsfiddle.net/3Y8vB/3/
Is anyone using MGSplitViewController inside a UITabBar?
My objective is basically to use UISplitViewController inside a UITabBar. UISplitViewController doesn't work well inside a UITabBar. Specifically, UISplitViewController splits apart when device orientation changes.
Since UISplitViewController didn't work for me, i turned to MGSplitViewController. And now it seems that it's not a workable solution to be used with UITabBar either. Im running into all sorts of problems. Mainly the following:
I have a tab-bar with 3-4 tabs. Each one contains a MGSplitViewController. In general, the MGSplitViewController contains a Master (UINavigationController) and a Detail (UIViewController). When i rotate the device, the content (UITableViewCell) inside the UITableView is misaligned/disturbed. Scrolling the UITableView to show new cells fixes the misalignment. The Master has a Navigation bar and a search bar, and orientation change doesn't affect them. Any solution?
MGSplitViewController is great! But it's not being maintained.
I ended up using IntelligentSplitViewController (github.com/grgcombs/IntelligentSplitViewController). Worked for me!
I recently upgraded to xcode 4. My application utilizes tabbarcontroller. In old xcode 3.x, you were able to change the tabs to different types per this screenshot:
From what I gather in researching this issue, xcode 4 no longer offers this functionality. Am I missing something? From what I researched we are now suppose to delete/add tabs then change attributes to get the desired effect. So, to that end in xcode 4, I've added a new tab item and made the class a UINavigationController fully expecting the ability to toggle the "Shows Navigation Bar" with a checkbox. But, the "Navigation Controller" grouping never appears. What am I missing?
Thanks for your help.
I was surprised at first too and I was about to ask the same question. But, when you open the Object Library, in the bottom you can see a big star, "Tab Bar Item". Just drag that to the tab bar and you will notice a new item added to the tab bar controller.
Weird but works!
Just drag drop View Controller onto tabs!
Thanks
I played with xcode 4 a little bit more and discovered you can drag Navigation Controller from library onto your UITabBarController and it will create your tab item for you and set it up as a NavigationController. Pretty cool. Hopefully this will help others.