Tag: uitableview

UITableView :cellForRowAtIndexPath Continues being called

I have a UITableView Controller and a UITableView. I have everything set up using the delegates etc, and it populates fine. I notice a small bug however with the following method: :cellForRowAtIndexPath I am noticing that this method is continually called every time I scroll the table. Even after the table is populated, it continues […]

Calling a New View when selecting a Row in a 'UITableView'

I am currently writing my first iPhone app, but have encountered an issue. I have a view which contains a UITableView. This is the first time that I have attempted this, and this is the behaviour that I am trying to achieve: When the user selects one of the rows, I would like this to […]

dequeueReusableCellWithIdentifier returns nil using storyboard static cells

I am having a heck of time with this. Using storyboard, I created a table view controller with a static cell that contains a UITextField to allow for user input. When the user is finished, I want to retrieve the contents of the text field. Here is what I did: Created a subclass of UITableViewCell […]

UITableView-like NSTableView

I wondered how I can make a NSTableView to behave like a UITableView on iOS. For example, splitting the content into sections as well as the typical behaviour of the section headers. Is that possible? If so, how? Thank you very much.

Using a XIB file for custom Tableview Section Header

I wanted to use a xib file to customise a tableview section in xcode (objective C), and here ar my files: SectionHeaderView.xib is a UIView with a UILabel SectionHeaderView.m #import “SectionHeaderView.h” @implementation SectionHeaderView @synthesize sectionHeader; @end SectionHeaderView.h #import <UIKit/UIKit.h> @interface SectionHeaderView : UIView { IBOutlet UILabel *sectionHeader; } @property (nonatomic, strong) IBOutlet UILabel *sectionHeader; @end […]

IOS: tableview delegate methods for two tableview

I have these delegate method for a tableview inside a class: – (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } – (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [array1 count]; } – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @”Cell”; UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if(cell == nil){ cell = [[[UITableViewCell alloc]initWithStyle:UITableViewStylePlain reuseIdentifier:CellIdentifier] autorelease] ; […]

UITableViewAutomaticDimension not working in Xcode 6.3

I updated my Xcode to 6.3 along with Swift 1.2, and I made the transition. Everything works except dynamic row height for table view. I have those on 3 completely different table views, so it probably isn’t something else influencing the bug. I set all of the table views to: tableView.rowHeight = UITableViewAutomaticDimension and all […]

alternative to deprecated UITableViewCell setText?

Code in the book Beginning iPhone Development (by Dave Mark & Jeff LaMarche) assigns to the UITableViewCell text property: UITableViewCell *cell = … … cell.text = … This assignment brings up a “‘setText’ is deprecated…” warning. What should I use as an alternative? Also, how do I open the long URL in the warning (in […]

problem with commitEditingStyle -to delete cell in the table

i have one section table which contain the section and i want to delete the perticular cell swap and delete this cell and remove that cell from table and also remove from the array. and how to animate that when the delete the cell. for that i code below but which is not working please […]

how to show options when a user clicks on UITableViewCellAccessoryDetailDisclosureButton

I am showing records in a UITableView having UITableViewCellAccessoryDetailDisclosureButton as the cell accessory. I want to display these “Save”,”Send to” and “Visit” options when user click on detail disclosure button, but i have no idea how to do this. Please help me.