This question already has answers here:
Is there a way to make UITableView cells in iOS 7 not have a line break in the separator?
(17 answers)
Closed 9 years ago.
UITableView draws with ragged lines on iOS 7:
How to fix it? The line between cells should be on the full width of the screen.
UITableView has a property separatorInset. You can use that to set the insets of the table view separators to zero to let them span the full width of the screen.
[tableView setSeparatorInset:UIEdgeInsetsZero];
Note: If your app is also targeting other iOS versions, you should check for the availability of this property before calling it by doing something like this:
if ([tableView respondsToSelector:#selector(setSeparatorInset:)]) {
[tableView setSeparatorInset:UIEdgeInsetsZero];
}
This is default by iOS7 design. try to do the below:
[tableView setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0)];
You can set the 'Separator Inset' from the storyboard:
Related
This question already has answers here:
Preventing UITableView from scrolling?
(2 answers)
Closed 6 years ago.
I would like to create a Sign Up page in my application and I want to create an immovable table(witch you can not scroll). I'm doing this in Swift language, if somebody knows will be very helpful. Sign Up Page
In the inspector window of the tableview storyboard turn off anything related to scrolling. And then just make sure your table view height does not exceed the view height
Have you tried setting the bounces property to NO?
You can use the following code:
tableView.bounces = false
tableView.scrollEnabeld = false
From https://stackoverflow.com/a/5344072/4882590
You can do that from your XIB as well as programmatically.
From XIB:
Just select the tableView and in Inspector uncheck bounce horizontally & bounce vertically and scroll horizontally and scroll vertically
Programmatically:
If you want to do that programmatically then you can try
self.tableView.scrollEnabled = false
OR
[self.tableView setScrollEnabled:NO];
This question already has answers here:
How to display multiple columns in a UITableView?
(6 answers)
Closed 9 years ago.
Is it possible to create multiple columns in UITableView, as my requirement demand me to do this, If it is possible how i can i resolve this issue.
Thanks in advance.
You may use UICollectionView for that. Or simply build each UITableViewCell with needed labels and elements in cycle with columns count
First thing you need to do is take a look at UITableViewCell Documetation and Read the Content given there. If you read it properly, you'll get the Answer in the form of these Steps :
Create Custom UITableViewCell with UILabel equals to Number of Columns.
Use this UITableViewCell in your UITableView.
Fill each Row of UITableView with your Database Table Rows.
Tutorials to Integrate custom UITableViewCell :
Creating custom UITableViewCell from XIBs – step by step tutorial
Crafting Custom UITableView Cells
GoodLuck !!!
If you will use CustomCell there will be scrolling issue. So the best way to do this is UICollectionView for ios6. I did it with CustomCell also so if you are working for ios5 I will guide you.
This question already has answers here:
Where is a good tutorial for making a custom UITableViewCell? [closed]
(6 answers)
Closed 9 years ago.
i am new to Iphone development, i want create a tableview that contains cells of different width, like iphone contacts app when clicked on add button a tableview appears having different sections and cell are different width compared to first and second sections.
any sample code for doing this.. ?
The different sections is a function of the tableview with UITableViewStyleGrouped. The different width cells are not individual cells. Each row is a tableviewcell. Each cell can be customized to look at any you want. So 1 tableviewcell can have 3 fields in it, like City, State, and Zipcode.
Google is your friend for the sample code.
J
This question already has answers here:
Expand/collapse section in UITableView in iOS
(17 answers)
Closed 7 years ago.
I managed to expand my cell (after many tries) as you can see in my pic.
but what I really want is something like this:
as you can see when the user click on description the cell expand showing the content:
Can please somebody tell me where I can find all the info to do that. (I struggling to find them). thank you very much!!!!!!
You can try apple's source code in your application- http://developer.apple.com/library/ios/#samplecode/TableViewUpdates/Introduction/Intro.html
or you can fallow this blog -
http://www.cocoanetics.com/2011/03/expandingcollapsing-tableview-sections/
and you need to add custom UITableViewCell design as per your need.
Change the height of the cell in tableView:heightForCellAtIndexPath:, change the cell layout in tableView:cellForRowAtIndexPath: and call [[self tableView] reloadData];.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Adding iOS UITableView HeaderView (not section header)…
I want to make a tableview header like in the contacts app:
Exactly like there, am image beside a label above the table.
Any way doing that?
Thanks!
Did you try a custom UIView with 2 subviews, a UIImageView and a UILabel, for a header?