I would like to recreate the interface below that allows the user to select a number by tapping a cell. What do you think is the simplest way to implement this? A UITableViewCell that has subviews added? A UIWebView containing an HTML table? Custom UIButtons?
Thank you!
//Scott
(source: spkant at home.comcast.net)
You can always use AQGridView or ATArrayView for creating those types of grid elements.
EDIT: As of iOS6, you should look into UICollectionView as it comes with the framework and it has more features.
Subclass UIView, draw and do the touch detection yourself.
Related
I want to learn and implement the most suitable/simple solution to display dynamic data (JSON) in three lines and an active (clickable) download icon. Screenshot is attached
I would be glad to get your ideas and advice!
Thanks
UITableView is the way to go, as you can reuse a custom cell you define. And to add to that, UITableView's cells are loaded lazily and are reused. You can use a UIScrollView but if you have a lot of rows it can horde your memory real fast. In your case, a UIScrollView can be used as well, but if you plan on expanding, UITableViews would be the choice. All in all, go with a UITableView + a custom UITableViewCell
If you have array of data like this, the best way is using UITableView class. With UITableview, you can custom your UITableViewCell on the fly
I'd really like to program an interface similar to the shortcuts gallery as shown below:
(source: i.ibb.co)
So I'm thinking this would be a table view with custom cells and then some kind of paging view or collection view? Am I along the right lines?
Cheers for any help!
If you're looking to achieve this UI you'd need to implement a UITableVIew with nested UICollectionViews.
Another approach would be to use a UIStackView with UICollectionViews.
I have design the UI for the below screen as I am little bit confuse that what should have to use for the below screen. As you seen the on the screen below things:
1.Scrolling part of Images swap.
2.Again another Scrolling images Swap.
So here for the scrolling Images what should I use its Collection View for both or Pagecontrol for one and Collection view for other. Please suggest me.
Thanks and Appreciate for the help...
Use UITableView and in its cell use UICollectionCell so that you can scroll horizontally and vertically.
see Back image, this is how you can implemented output looked like.
As Tinu Dahiya pointed it correctly, You should use tableView and custom tableViewCells to achieve your UI design. This approach will also make your coding easy to handle dynamic contents which you might be fetching from server. For your reference you can directly use this control from cocoa controls. This control is ready made dish for you, you just have to implement your logic to achieve your functionality.
I have this task that I need to create a custom scrollable view with 3 different types of cells from scratch.(no UICollectionView nor UITableView)
I have no idea what is the best way to start. Wether I should subclass UIScrollview or ...
Any guidance or direction would be highly appreciated.
Create object of UIView, keep adding in UIScrollView depends on your array count.
Keep dynamic calculation for next UIView add subview in UIScrollView
Put transparent UIButton on UIView or use touch gesture to implement like didSelectedRowAtindex.
Another solution we can adapt when there is no UITableView.
Both TableView and Collection View inherits from UIScrollView. So using the parent class could be efficient. But inheritence also serves independent extensions it would also be ok to use the sub classes.
So, Decision depends on what you do. Here in your case.
If one of the cells include a text field for user entry, then scrollview could do better as it offers convienience to scroll/shrink/retain the current UI while showing all the content of UI even when keyboard is present.
If the cells only involve fields like labels,switches,indicators etc then tableview is the choice.
If the cells has non-consistent or non free flow sections then collection view could be better.
I have iPhone app, which using UITableView with custom cells. I try to create universal app, and i understood that I need multiple columns for content. I thought that UICollectionView with custom cells will be the best idea, but I don't know how to combine UICollectionView and UITableView in one ViewController.
Maybe are there any possible variants to use different classes for iPad and iPhone?
Can anybody help me with it, or give any advice?
Use UITableView or UICollectionView.
But you won't need both in same viewcontroller as I known.
As you said, To show multiple columns UICollectionView is good to go. UICollectionView does all things which is doing by UITableView. Even you can do much more things with UICollectionView.
You can simply even create your own layout. Or else there is a default flow layout.