Fixed number of cells in table view [closed] - ios

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 9 years ago.
Improve this question
I want to fixed number of cells to be shown. If user wants to see more records, he will scroll down to see them.
I also want to add a button at the bottom of the table view to move to other view.

UITableView is what you are looking for.
An instance of UITableView (or simply, a table view) is a means for
displaying and editing hierarchical lists of information. A table view
displays a list of items in a single column.
There are many resources on the Internet that can help you. Example tutorials:
iOS UITableView Tutorial for Beginners
Create a Simple Table View App

To add add button to the bottom of UITableView, just create a UIView(say 320 x 50) and add a UIButton on it. Create IBOutlet of this View. Set this view as footerView of your tableView,
self._table.tableFooterView = yourView;

Related

Swift - Paging with CoreData and CollectionView [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 months ago.
Improve this question
What is the correct way to implement paging in a CollectionView with CoreData?
I have thought of 2 methods.
The first involves showing a defined amount of objects, increasing it when the user moves to the top of the CollectionView and finally reloading the data.
The second would be to manipulate the size of the cells to assign a value of 0 to all those that I do not want to show until the user moves to the top, once this is done, reload those cells to assign them their debit size and make them visible.
Is any of these a good practice or is there a better one?
For what I understand, you're using load more cells when the user scrolls to the top?
If it is what I understand, you could customize the collection view layout to add cells from bottom to top. I have built a load-more collection when the user scrolls to the top here: https://www.dropbox.com/s/0ccd34cn05b01ua/ReversedCollection.mov?dl=0
An example can be found here.

How do I create this type of view in iOS [closed]

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 5 years ago.
Improve this question
I'm trying to experiment with swift and I was thinking of making something like the picture. But I can't figure out what views they are using. Can someone just explain if it is a collection view, table view or is it a collection view embedded in a table view?
Example
It appears to be either a UICollectionView or UITableView, with UICollectionViews embedded in each cell.
A UITableView should be fine for the main container view, as it provides vertical scrolling, and then UICollectionViews can be used for the horizontally scrolling content in each cell.

Swift 3 - How do I implement an accordion-style layout? [closed]

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 5 years ago.
Improve this question
I am using Swift 3, Xcode 8.2.
I want to achieve something like the look below:
I want a view where I can have a top heading and label and an intro paragraph along with a line separator but have this "accordion" style layout where users can click to reveal/hide different parts of the information.
Can someone point me in the right direction?
Since there's no actual accordion style layout in UIKit, there's no right answer, you'll just have to roll your own.
Here's how I've done it:
Create a sectioned tableview, each collapsable group of
information is it's own section. Each section should have a section header. Implement viewForHeaderInSection.
The header view could have a label that says 'Yearly Benefit Tracker', etc, and a disclosure image that changes based on whether the
section is opened or closed, like in your example.
Each section has a tap gesture recognizer associated with it.
When a tap gesture is triggered, the corresponding function adds that section to a set of 'collapsed sections'
Reload the table view
When number of sections is called it still returns all the sections
When number of rows is called check to see if that section is in the set of collapsed sections. If it's collapsed, return 0 rows for that section.
Implement the reverse for expanding.

Collectionview or tableview? [closed]

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 5 years ago.
Improve this question
Is there any way to achieve a view like this in ios?
There will be infinity scrolling in each row, how to achieve something like this? Is it using collectionview? and How can it be done? Any suggestion?
You need to use table view and in every cell of table view you need to use a collection view please look on this Link and this Link as well
OPTION 1:
You can use one uicollectionview for each sub-category that will scroll horizontally using UICollectionViewScrollDirectionHorizontal.
Here is a link that may be useful.
OPTION 2:
You can use one single uitableview for the whole page with header (section) saying the sub-category title and 'view all' button.
To scroll uitableview horizontally please check these links:
Link 1 and Link 2.
OPTION 3:
You can try GitHub example PTEHorizontalTableView. Use this tableview with header.

How is the Notes app Details screen designed [closed]

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 7 years ago.
Improve this question
So I am working on a Popover view that shows a few settings similar to what the iOS note app does when you tap the info icon next to a note. However, I am quite new to iOS development and I'm a bit unsure how that view is composed.
Take the "Remind me on a day" section. Is that just a static UIView with a UILabel and a switch, or is it actually a 1-row tableView with a custom cell?
You can use a grouped table view and then use the individual controls such as the switch and segment control as accessoryView for each table view cell.
Or you can design this entire screen in the nib or storyboard itself using static cells. Then you can connect their target/action to your table view controller class and add the appropriate code.
A UITableView, with Content set to 'Static Cells' and Style set to 'Grouped' in interfaced builder. There are 3 sections, with 1 cell in the 1st section, 1 in the second, and 3 in the 3rd. The sections have no titles. It's embedded in a navigation controller to provide the 'Settings' title and 'Done' button.

Resources