I am new to iOS development and trying to develop a sample phone book application. Each contact carries (Name, Image, Email and other stuff).
Through storyboard, I tried creating UITableViewController with one prototype cell. Now in the cell I tried to add one UITableView (3 rows) to hold contact information, but not working.
Is this the right way? Using StackView (Vertically) will fail in iOS 8, so I am trying to use tables.
Related
I'm pretty new to Xcode and I'm learning. I'm trying to make a test app. I can't get it to show up in the app like I set it in my storyboard?
Add a UITableViewController and assign it to your tableView. And FYI in Xcode you design one cell only if you are using dynamic cells and the population of the cells will all happen inside your UITableViewController (hence the name PrototypeCell)
I have a cell in the UITableView. The cell has a UITableViewCell class. In this class I programmatically add few buttons.
Note: the cell is located in the very end of the table view.
Issue:
If I'm using simulator iphone 5 > the buttons will be shown.
But if I'm using simulator iphone 6+ > the buttons will NOT be shown.
Note: when i'm opening it on iphone 5 I need to scroll to see that particular cell. on iphone 6+ i don't need to scroll there, the cell is visible right away.
So I think the issue is somewhere here. May be with the place where I do my 'buttons adding'.
Where should I call the method that sets up the buttons?
Or how can I solve this problem?
TL;DR: If you have different cell types in your table view, you should make sure they have different identifiers.
Explanation:
Table cells are re-used within the UITableView and when the table is first being displayed it won't have any re-usable cells yet. It gets the cells to display by calling on its data source through the UITableViewDataSource protocol.
The thing providing the cells will first ask the table view if it has any re-usable cells (of a particular type), before creating a new one. The way it determines the particular type is from the reuseIdentifier in the table cell.
So, if you have two different classes of table cell, but they share the same reuseIdentifier you will sometimes get one class and sometimes the other - if you get the one without buttons when you're expecting the buttons then this will be a problem!
The answer is to make sure your different cell types have a unique reuseIdentifier.
I'm trying to create a Table View Cell array and have the name displayed in each table. The tables will look like what you see on the home screen of the Evernote app (shortcut, tags, places, notebooks etc.) and each one will access the next screen when tapped. How do I go about doing this? Novice app developer.
This is an image of the result I'm trying to get.
That is a basic cell with transparent background and other views (and images, layers, etc.) added as subviews.
For the other things I suggest to study how UITableView works and how to push a UIViewController using a UINavigationController.
In general you should study iOS and Objective-C from zero.
I am trying i am working on my social network app and I need to implement my profile settings window
To show what exactly I am talking about I will attach a picture.
https://pp.vk.me/c622224/v622224461/18d2f/lqcCCkXxHiY.jpg
I have 3 following questions:
1)Which kind of cells should be used (Static, Prototype, Dynamic) in order to create this kind of view.
2)How did they manage to resize 2 of 3 cells' width in order to fit an image there too
3)Are these gaps between different sections being a different table?
1 - You must use prototype cells in order to change the data for each user
2 - The photo section can be a UIView added as subview to UITable
3 - The gaps are not because of different tables, is a table setup as Grouped instead of Plain.
I am trying to replicate the contacts application in iOS, using two table views in the "New contacts" view. I am trying to scroll up the tableview when the keyboard covers the content. Each cell contains a textfield, I have to enter into that some details. I have used two table views, one is placed as header view over the other. I am not getting the code to scroll up the tables... Any help will be highly appreciated. Thanks in advance
If you want the 2 tableviews scroll together you have to use only one main tableview, I mean, you have a main tableview with all the content, and then cells with the textfields.
The cell with the photo, name, surname and enterprise (I'm not sure if they are the correct names because I have it in spanish), contains a imageview for the photo and a tableview with 3 cells, one for the name, other for surname and other for enterprise.