Tag: uitableview

Xcode tutorial throws execution error

I have completed “Your Second iOS App” only to have the execution fail before the iPhone simulator completes it startup and see signal SIGABRT in Xcode. At the bottom of the tutorial page there is a listing of all the .h and .m files. There are two peculiar things that I have noticed. (1) Two […]

UITableView, Image in cell isn't showing, despite showing in UI View Hierachy inspector

I use a UITableView with custom UITableViewCells. In the cells I have a UIImageView. I assign an image to that image view from a url from my model. All this have been working fine until now. When the cell is returned in cellForRowAtIndexPath, the image is fetched through a UIImageView extension and assigned to the […]

Added table view cells follow 1 custom style?

I am wanting to create a custom UITableView cell. I would like to know how to do this. I understand how to actually create it and write code for it, but how can i create 1 style and then when i have more cells added, i want the same style. How can i do this? […]

TableViewCell is piled up and appear again and again

I implemented TableView with ADLively TableView. But if I scroll tableView, the cell’s texts become to be piled up again and again…. Using “cell.textLabel” is good, adding UILabel is not good than that but if I use “cell.textLabel”, I can’t resize width of textLabel. (I want to add UIImageView on the left and right side […]

Passing data while dismissing a view

I’m working on an app with two different views which can modally present a “settings” viewController with a tableView embedded in it. To pass the data from the embedded tableView to the first two views I would have to use prepareForSegue in each view transition (to my understanding). However, when I’m in the Settings view […]

UITableViewCell reusability issue. Modifying one cell is affecting others

Whenever a cell from section 3 is selected. I’m updating the DataSource array, and the cell’s background color is thus changing correctly. However, whenever I scroll back up I start seeing random cells with the modified background color, knowing that I don’t even mention it in my cellForRowAtIndexPath method and each section in my tableView […]

How do I put an UIImageView in the center of a tableView

I want my image to be in the center in the x axis, I’m writing this code : let emptyImage=UIImageView(frame: CGRect(x: (UIScreen.main.bounds.width)/2 ,y: 200 , width: 50, height: 50)) but it doesn’t work.

Making table view section expand swift

I am following this tutorial for expanding and collapsing my table view section. As this demo is done in swift 2.2 I have made all the changes according to swift 3.0 . I am stuck at the below function at if condition(currentSectionCells[row][“isVisible”]) which gives me error as “Type ‘NSFastEnumerationIterator.Element’ (aka ‘Any’ has no subscript members)’”. […]

How to to create a segue to push back to editing mode from a table view?

Maybe I didn’t ask it right in the title, sorry for this, i’m a beginner so I will explain myself: I have 2 screens: 1. Create notes – this screen have a view controller, TextView and navigation(with create/cancel). 2. Notes page – this screen have a table view controller and a navigation with a plus […]

Loading a table view nib after button push

I have used the following code to add a button to my navigation bar that when pressed will call the method showCountries: UIBarButtonItem *countriesButton = [[UIBarButtonItem alloc] initWithTitle:@”Countries” style: UIButtonTypeRoundedRect target:self action:@selector(showCountries:)]; self.navigationItem.leftBarButtonItem = countriesButton; [countriesButton release]; Now this works, the button appears and when pressed goes to the showCountries method as planned. What the […]