Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am currently making a timetable in a collectionView.
I want the user to scroll through the weeks using paging in the collectionView.
I am struggling to change the dots into words like: Monday, Tuesday, Wednesday. IS this possible using page controll, or should I code from scratch? See image for example
You can try this pods, I think it will help you.
https://github.com/rechsteiner/Parchment
Parchment is a very flexible paging view controller. It let’s you page between view controllers while showing any type of generic indicator that scrolls along with the content. Here are some benefits of using Parchment:
https://github.com/xmartlabs/XLPagerTabStrip
XLPagerTabStrip is a Container View Controller that allows us to switch easily among a collection of view controllers. Pan gesture can be used to move on to next or previous view controller. It shows a interactive indicator of the current, previous, next child view controllers.
I think you can make it custom components. It's easy to implement.
Take UICollectionView to this paging options. And add UITableView below to UICollectionView.
Change your data after select any item in UICollectionView.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
Any ideas how to create like this animation on iOS using Swift ? Thanks
There are three ways to achieve this (probably more than three):
Create a custom header and listen to your table view Scroll, then update the header based on the offset.
Use a third party library like this one:
https://material.io/components/ios/catalog/flexible-headers/
Follow a tutorial (there are many of them): https://www.youtube.com/watch?v=lML5XMLrZEk
Sometimes it is better to do that by yourself, but in this case, I think a framework could help you.
I think it's not the UINavigationBar. You could change nav bar alpha then add custom view to table view or collection view and create animation that you need when scrolling.
Custom Collection view flow layout or ScrollView with UIScrollViewDelegate adjusting the header height when content offset is changing.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I've a countdown app, it counts the time towards and since a date that the user chooses, and would like to know how to allow a user to pick more than one countdowns.
I'm thinking if there is a way to let the user duplicate the view, but I could be far from right, I'm new to this.
Any help would be much appreciated.
Thanks.
Given the requirements that you mention on your question and the follow up comments, I think perhaps the best is to use a horizontally scrolling collection view, with each cell taking up the whole screen.
(before the advent of autolayout, I would have recommended a UISCrollView with the content size varying at runtime as you add pages, but setting up UISCrollView correctly with autolayout is a steep learning curve. UICollectionView and UITableView take care of this for you behind the scenes).
The setup would be like this:
In the storyboard, embed your view controller in a navigation controller, so you can (perhaps) have your "Add Countdown" button as the navigation bar's right bar button item.
Next (still in the storyboard), add a collection view to your view controller and wire any outlets/delegates/etc.
Implement your data source so that it reflects how many countdown objects you currently have, and set up the "add" button so that when tapped, it creates a new counter and refreshes the collection view.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Good day everyone!
A customer asked me to implement a view. Here you can download and look at video how this view should work. (Left cells are days, right - hours)
It's kind of calendar view.
I've tried to do this task with collection view and custom layout. But do not hit much success. Because of the tricky transition of left cells. They become smaller (to speed up scroll), but right side is still the same.
Is there any possibilities to create such transition in collection view or picker view? Or should i use base view with overriding draw method?
Regards, Eugene.
It's a calendar, so it's essentially infinite, so I don't think a UICollectionView or UITableView is appropriate for this (e.g. what would you return as the number of cells?).
I'd be creating custom UIView subclasses for the left and right side, and overriding drawRect.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Hi I'm new to iOS Development. I want to design something similar to Groupon app for iPhone.
I need 4 or 5 table views (each table view is a category which lists the products in that category )which I can slide or swipe through like in the Groupon app.
I'm confused on whether I should have all the table views in one page view which can be swiped through or one page view per table view.
Any help is appreciated.
Thanks.
UIPageViewController does exactly what you need:
A page view controller lets the user navigate between pages of
content, where each page is managed by its own view controller object.
Navigation can be controlled programmatically by your app or directly
by the user using gestures. When navigating from page to page, the
page view controller uses the transition that you specify to animate
the change.
Here is a very nice tutorial on how to implement it:
http://www.appcoda.com/uipageviewcontroller-tutorial-intro/
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Hi I'm new to Xcode and don't quite understand the difference between all the view controllers. Eg what is the difference between a uiviewcontroller with a collection view on it and a uicollectionview controller it self? Confused as to why I wouldn't use a view controller then add views onto it depending on my requirements eh table, collection etc. Can anyone help to shed some light?
It's based on your requirements. You may change some properties with your View controllers. But when you use as part of its' controllers, you can't change it.
For example you Can´t change UICollectionView Size of UICollectionViewController(see this).
In these case, you must use UICollectionView in viewcontroller. As like this, if you want to customize some property but functionality are same in all.
Here I mention some ref for you: Ref
You can take UICollectionViewController as a template which will have every thing for you. And view controller is simple scracth pad, you have to add things on it. There are some pros and cons in view controller you have to do every thing yourself, but collectioViewController you got controller with collectionView. But you can not change things as easily in it.