razeware / emitron-iOS

iOS version of emitron
Apache License 2.0
355 stars 82 forks source link

My Tutorials: Swipe to switch sections #494

Closed luke-freeman closed 3 years ago

luke-freeman commented 4 years ago

Can we add swiping between My Tutorials tabs?

bladebunny commented 4 years ago

I think this could be done with PageControl/PageViewControllers or even UIScrollView in iOS 13 (SwiftUI 1) or with a TabView using PageViewStyle in iOS 14 (SwiftUI 2.). You should be able to keep the current style with the toggles on top. Something else to consider would be refresh behavior. Toggling "tabs" now causes a reload of the displayed view because the content view/page is recreated each time you toggle. Obviously with swipe/paging at least the prior and next views (3 when current is included) generally have to exist beforehand. Still possible to trigger the refresh on the to-be-displayed view but just pointing out because depending on the desired behavior there are a few additional tasks. I could probably do this within a day or two if you want to assign it to me. (And provide some additional guidance). I wouldn't want to start working on it if it might be wasted effort. Cheers!

0xTim commented 4 years ago

@sammyd are we iOS 14 only now?

sammyd commented 4 years ago

Not formally, no, but I'm open to a proposal to drop iOS 13 support if it makes life easier, offers additional functionality, or makes the codebase more useful from a teaching perspective.

0xTim commented 4 years ago

I think that's a call for anyone using the app to teach, but I suspect most of the tutorials will be getting an update since iOS 14 improves stuff a lot

sammyd commented 4 years ago

Happy to do whatever you think is best @0xTim. I don't really think this is an especially critical request, but I'm easy.

0xTim commented 4 years ago

No I agree - I think we can leave it until something from iOS 14 is needed and the app gets bumped

heathermh commented 3 years ago

I've been working on a solution for this since it's listed as a good first issue. I started with @bladebunny's suggestions, but it worked out to be more simple and works in iOS 13.4+.

byaruhaf commented 3 years ago

is the app getting bumped to iOS 14?

0xTim commented 3 years ago

Yes I think we're bumping it soon(ish)

sammyd commented 3 years ago

This is done? I'm closing the issue.