Does anyone know a library I could use to make a slider menu like in the image below?
slider menu
Like the image, I need to display the days of the week
What I've tried:
(1) Using CAPSPageMenu repo on github but I came to realize this is inefficient for what I need. I only need one view controller, and will have hundreds of menu items (each menu item is a day of the week)
Other possibilities:
(1) Should I create a tableView, rotate it 90 degrees, and allow that to function as the horizontal scrollable menu?
(2) I found a tutorial online that lets me embed a collection view inside a tableView cell... But it seems rather cumbersome to make a cell for every day of the week.
That would be pretty easy to create using a UICollectionView. Do NOT try to rotate a table view. That path leads to madness.
You could use the shortWeekdaySymbols from NSCalendar to get the names of the days of the week.
Create a UIScrollView and put calendar date views inside it.
Related
I have a project that uses a simple UITableView to represent a month of items. Each row is a day of the month and the table represents a single month. There is a small view at the top of the table view with buttons to move forward in time (Next) and backwards in time (Prev), one month per click. This all works perfectly fine.
What I am searching for is a way to "slide" the current month off and the next/previous month on when the appropriate buttons are clicked. The affect would be similar to using a page view, but there could be "infinite" (indeterminate) number of months forward/backward, so this seems to eliminate using segues, page views, etc.
I have found code to animate the left/right movement of the current tableview, but these don't seem to fit the bill either: I need a "new" table view to move into view as the "old" table view moves off.
The only thing that seems to make sense is:
Create a new table view "offscreen" and populate it
Animate the current table view to move off screen as the new table view is animated moving on screen
Swap "old" and "new" to prepare for the next transition
Seems like a ton of work, which I guess is OK but I'd hate to invest the time if there is a better way. Any ideas?
Thanks!
I want to create something like this(refer image)
as you can see in above image, here column represents date and row representing time. User can vertically scroll for time and horizontally for date. blank spaces will be clickable.
I have searched for similar kind of UI, but I don't know what to search. any thoughts to implement this custom UI will be a great help.
Thank you.
Here is the idea, if you want to implement a slightly simple design as displayed in your screenshot.
You can divide the complete UI in 3 small parts and design it,
To display "February 2017", you can addd a label.
TO display DATE, You can use CollectionView, which will have direction of Horizontal and set the content and create a logic by which you can display 31 for Month or week wise as per your need.
You want to display Time which scroll vertical, then to display that you can use Tableview in which time will be displayed.
Above is the just idea by which you can create a simple UI, in which
as per DATE selection, Time will be displayed in tableview.
What you are looking for is a week view which is similar like this component Calendar-UI. You can take it as a reference or modify in it as per your need.
You can customize the UICollectionView by subclassing UICollectionViewLayout to let UICollectionView behave the way you want.
Check this library, it may be helpful to you. Here is the github link.
I am currently experimenting with a calendar framework I found online which possesses most of the functionality I need. However, I would really like to add a feature similar to the animation in the iOS Calendar where when a date is tapped, the view splits at that location and the selected week moves to the top of the calendar. Its an intuitive way to display info about the selected day. I just need some suggestions as to how this can be achieved since I'm not super familiar with collection views.
The calendar is a grid collection view with months as different sections from what I understand. Is it possible to just stick a supplementary view anywhere in a collection view dynamically? Or maybe I should look into adjusting insets at a specific location? I'm really not sure what direction to take and could use some suggestions.
Here is sort of what I want to do but with a table view.
I'm trying to create a custom calendar/ month view from scratch similar to this:
And with that I'm wondering what the correct approach would be. I'm calculating which weekday the first day of the month falls on (mon-sun), and the number of days in the month. This should be enough to determine how the calendar should look, but I'm stuck trying to figure out a way to lay this all out.
Is it best to have 37 buttons in a grid layout in the storyboard and iterate through them somehow, changing their label, or dynamically create these buttons on the fly? Is there any element/ framework in iOS I could make use of to make this process easier?
If going for the latter, how would you set up the constraints to make this scalable on different size classes and screen sizes?
Tim in first comment is right. The best way to build layout for custom calendar view such yours is UICollectionView. Also to make less mistakes you can use NSDate extensions like this one: https://github.com/erica/NSDate-Extensions
I need to display students timetable in an application; a TableView contains a complete week, from Monday to Sunday. I'd like the student to be able to go next week by swiping horizontally, finding a new UITableView filled with the new week.
In other words, I'd like to scroll like photos on Facebook, but with complete UITableView filled with pieces of data.
How to do this programatically? Embedding several UITableView in a UIScrollView?
Thanks a lot...
Sincerely,
Hervé
I've done this before using a UIScrollView with paging enabled.
The other alternative which is slightly more complex but makes it easier to manage each individual table separately is to use a UIPageViewController.
It sits behind the view controller views sort of like a TabBarController or a NavigationController.
You manage it a bit like a UITableView in that it has a datasource and it will ask for the "view controller at index".
Examples of this being used are in the Photos app when you are looking at full size images.
I would suggest you to use UIPageView controller with UIView.... and you can use animations on those views whatever you like.