preserveContent now added to mat-tabs? - angular-material

Does anyone have a working example of this? I was originally implementing a solution similar to this answer here, but then saw that this feature was finally merged!
Does anyone have a working example of this? Our use case is having tabs that have functionality reliant on iframes on separate tabs persisting.

Actually, I found examples here in the feature pull request.
It is as simple as <mat-tab-group contentPreserve="true">
However, now it is causing unexpected behavior in my tabs (might be related to this mentioned in the Docs: "One gotcha here is that we have to set visibility: hidden on the off-screen content so that users can't tab into it.") - now the iframe is loading further down the page and out of normal view. I will tinker around with the styling as that may be the cause since we made some tweaks to account for or previous workaround. Glad to see this being implemented now and would still be eager to see other people's use of mat-tab-group!

Use preserveContent in mat-tab-group.
Keeping the tab content inside the DOM while it's off-screen

Related

How are apps with typical menu-bar-style navigation coded?

I’m a relatively new app developer working on a couple of individual projects. I’ve dumped at least one hundred hours into coding using Swift in Xcode, and, as embarrassing as it may be to admit, it seems I can’t fully grasp or find information pertaining to how popular apps such as Facebook, Instagram, YouTube, or Tinder implement non-linear view navigation via a menu bar at the bottom of the screen.
I’ve seen one particular app tutorial series that exemplifies how to go about making this menu bar style possible using a collection view of horizontally-placed views each equivalent to the size of the screen. I understand this gets rid of the issue of loading new views on top of existing old ones that sit in the background (my primary worry, outside of unnecessarily reloading information), but is this the typical method of implementing non-linear menu navigation in an app? I suppose a more pressing question at this point is “How can I go about making something like this using SwiftUI?”
If anyone can offer information, explanations, and/or sources, they would all be much appreciated. Thank you for your time!
So, upon receiving TylerTheCompiler’s comment on my post, I started researching the UITabView. It appears that this is used for creating exactly what I was trying to explain in the initial post. I subsequently searched for a way to implement this in SwiftUI and found the “tabbed view.” The tabbed view seems very easy to implement and is exactly what I’ve been looking for. I still wonder if popular applications have been utilizing the UITabBar rather than something else more practical that I am still unaware of. If you happen to know, please comment on this post — I would love to know, myself. As always, thank you for your time, everyone!

Tabview as sticky header in react-native

I'm using one third party library for tabview in react native.ie, React-native-tab-view. I need to create this tabview as a sticky header in table view. Below is exactly how I need that. When I scroll the page the banner will go up but those 3 tabs remain on top. Can someone help on this, please?
I created a sample project on Github. It should do the trick. I used native animations, so I can only animate transform and opacity, which should be pretty fast. One of the problems though is that the nested navigators are not connected, but you should be able to do that. Can't be that hard :P
And for now the banner is shown even if you switch the tab, which may not be the behaviour you want. But I think overall this repo gives you a good starting point. At least I hope so :)
If you want to know how to nest navigators with views in between them you can have a look at a second repo on Github I made today for another SO question. Maybe I'll write a Medium post about this topic. Depends on my spare time I guess :P

Scrolling issue with fixed divs in iframe on IOS

I am having a problem with iOS scrolling on an iPad. Every other platform tested works just fine. I love iOS, but hate it too. I was able to get the entire iframe contents scrolling within the parent, but there are two DIVs that are fixed that shouldn’t scroll within the iframe.
Before I spend a lot of time trying to work this out, I am just looking to leverage everyone’s experience for whether it, in fact, CAN be done. If it IS possible, then I will proceed to trying to work out a simple model and report it back for others. If experience shows that it can NOT be done, then you will all have saved me a lot of headache, not to mention time.
Here’s a drawing of what works on all other platforms but NOT iOS:
Simple question: Is it possible?
The simple answer is, in fact, YES.

How to avoid WKInterfaceTable overlapping the page control?

When I use the WKInterfaceTable along with a page control, the table contents overlap the page control. Is there a way to avoid this?
The view's architecture:
-Group
-Label
-Table
Short of ensuring your views never require scrolling, there's no way to prevent this, unfortunately. It's come up on the dev forums numerous times, and no such API exists in the docs.
Here's a link to a relevant post in the forums: https://devforums.apple.com/message/1100695#1100695
Even if you could do it, I think it would be fairly confusing to users to not know which page they were on in your navigation.

UIPageViewController turn-to-page example

There are a couple of explanations on how UIPageViewControllers work, and I have read them. I have built an app based on the approach in Neil Smyth's excellent 'iPhone iOS 6 Development Essentials" in chapter 28. It is elegant and simple.
It seems a relatively simple thing to add a method to this class, and a button to the main app view, to cause the UIPageViewController to turn to a specific page. But I cannot quite see the beset way to do this.
If someone could point me to the solution -- or tell me how to add a method that would I think use the provided "viewControllerAtIndex:" method cause the page turn i want.
Seeing this done (exactly what code codes where) in that app would help me understand and point the way to a solution in my own app.
thanks everyone sorry i know this should be obvious from the ansers to the likes of this question link but i am not quite getting it.
As noted in my comment I can close this question as I've found a good solution. As I wanted both "skip ahead" and "skip back" as well as "jump to page", I used a solution that involved specifying the top level View Controller as a delegate to content view controller, keeping track of the current page, and then passing the clicks on contentViewController back up to the implementation of the top level controller (as delegate) to move to the new page(s).
I have posted the source code for this solution as part of the "A-B-C Picture Book" source code. This app is in the app store; see https://itunes.apple.com/us/app/a-b-c-picture-book/id578864421?ls=1&mt=8.

Resources