Tag: uitableview

How to populate a UITableViewCell with the correct resolution image?

I have set up a UITableView that contain cells of images. I am using Asset Catalog to name the images appropriately as image1.png, image1@2x.png, and image1@3x.png. I have an NSMutableArray that I initialize with the image names from Asset Catalog, for example like so: viewDidLoad: self.LogoArray = [ [NSMutableArray alloc] initWithObjects:@”image1″,@”image2″, image2″, nil]; Then I […]

iOS – UITableViewCell make text bold

I have a string: NSString *userInfo = @”James Johnson @james”; What i want to do is bold James Johnson and keep @james normal font. So what I have tried is using NSAttributedString but somewhere I’m doing something wrong in order to complete the process. This is what I have tried: NSString *user = @”James Johnson […]

Enable UITableView edit only in a specified section

I have a tableView with 4 sections. I want to enable editing (move/drag/ rearrange ) the cells only within the forth section. When I set: tableView.editing = YES I get all the table view to be in editing mode. This How to limit UITableView row reordering to a section helped me as I can now […]

UITableView background color iOS 9

I have a UITableView that I want to set its background color to transparent. Background color for the table view and all subviews at interface builder is set to transparent. It works fine for iOS 8 & 7. but, not iOS 9. any idea? cellForRowAtIndexPath method: [cell setSelectedBackgroundView:[[UIView alloc] init]]; [cell.selectedBackgroundView setBackgroundColor:[UIColor clearColor]]; [cell setBackgroundColor:[UIColor […]

tableView.tableHeaderView being set but not drawn

whenever I set my tableHeaderView I’m not seeing it in the Simulator. If I add it as a subview, it ends up getting drawn underneath the section header. Any idea what I’m missing here? I do have a XIB file. I didn’t see any properties in IB to affect headerViews though. – (void)viewDidLoad { [super […]

Display Locations on UITableview

I want to display the locations in UITableView. Here I take one UITextField and UITableView. Now I want to display the name of location in the table view according to the keyword typed in the text field. Any one know how to do that? Please help me friends. The table view should bring up suggested […]

Alphabetical plist with name and description numberOfRowsInSection issues

So, I have a plist that describes multiple cuisines. In my plist, I have 26 arrays, each with a key of a letter of the alphabet. In those arrays, contain multiple cuisines, which are dictionaries. In every dictionary are 2 strings, one for the name of the cuisine and the other for the description of […]

iOS 8 Self Sizing Cells – Allow Zero Height

I am using the self sizing cell feature and it works well until I want to hide a cell completely. I moved away from heightForRowAtIndexPath for this and I setup the following: override func viewDidLoad() { self.tableView.rowHeight = UITableViewAutomaticDimension self.tableView.estimatedRowHeight = 0 } However when I have no text for a tableviewcell to render I […]

Keyboard does not appear in the UIWebView on the UINavigationController

I have a UIWebView in UINavigationController. I have a TableView, When the clicks cell of the table, it goes to WebView, but when user clicks textfield in webview, keyboard will does not show up. Why does not show up? Which part of code is required? This code is part of the transition to UIWebView below. […]

custom cell not appear in tableview

I use storyboards. I create new class for my Cell, in storyboard I write in Reuse Identifier “userFullCell”. My Cell class .h #import <UIKit/UIKit.h> @interface UsefullLinksCell : UITableViewCell @property (weak, nonatomic) IBOutlet UIImageView *image; @property (weak, nonatomic) IBOutlet UILabel *shortTitle; @end .m default #import “UsefullLinksCell.h” @implementation UsefullLinksCell – (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super […]