uitableview

UITableView and Cell Reuse

▼魔方 西西 提交于 2020-01-14 07:57:21
问题 I have a UITableView and I've subclassed UITableViewCell (called it CustomCell ) so it has several labels and a UIImageView . Only certain cells will actually display an image. Here's my code for tableView:cellForRowAtIndexPath: : - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { Match *aMatch = [[appDelegate.matchByDate objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]; static NSString *CellIdentifier = @"Cell"; CustomCell

Custom UITableViewCell With Core Text

谁说我不能喝 提交于 2020-01-14 06:20:29
问题 Using the help of @yaslam I've created in Core Text an UILabel that show Japanese text in both horizontal and vertical way with Furigana using CTRubyAnnotation. Unfortunately I've a problem. I need to use this label inside a custom cell and I need that the cell dynamically resize the height of the cell based on text. but don't work. the cell doesn't expands Can you help me? Thank you very much Here's code import UIKit protocol SimpleVerticalGlyphViewProtocol { } extension

UITableViewCell as progress indicator

南笙酒味 提交于 2020-01-14 06:12:07
问题 I am trying to set the whole cell background view to show a progress indicator. if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"Cell"]; UIProgressView *progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault]; cell.backgroundView = progressView; [progressView setFrame:cell.bounds]; } this does not set the progress bar to the whole cell, but just the top part of the cell. Should I make the cell

“Load More” in UITableView

北战南征 提交于 2020-01-14 06:06:14
问题 I'm loading an RSS feed into a table view. I'm going to load 10 entries and then would like it say "Load More" in the last cell or somewhere below the last cell, so when the user clicks on Load More, the rest of the RSS feed gets loaded. Since the RSS comes off of my web site, I can program it to get the 10 or all entries on the server side (using a query string or something). The question is how to render a table such that the last cell has a Load More link that the can clicked to call a

How to update user interface on Core Data?

假如想象 提交于 2020-01-14 06:03:40
问题 I have an app with UITableView, Core Data and NSFetchedResultsController as well. I have passed data to the DetailViewController. And I can delete them from the DetailViewController! In the Apple's iOS Notes app, you can see such as functions as I wanted! When you delete a notes from the DetailViewController ( for example ), object deleted and Notes app automaticlly shows the next or previos notes! I want to create such as function. How update user interface after deleted current object? Here

cellForRowAt indexPath is not being called with reloadData() method

独自空忆成欢 提交于 2020-01-14 06:01:19
问题 In Swift 3, I am trying to create a "Filter" view that lets the user filter posts in a table view by category and by date. Currently, the filter view is presented modally and is dismissed when you click "Done". I have not set up the date/category functionality yet. First, I am just trying to get the tableView to update to show only 3 of the posts rather than 10 . To do this, I set destination.numPosts = 3 in my FilterViewController . Using print statements, it can be seen that the

Custom UITableViewCell. Failed to apply UILineBreakModeTailTruncation

∥☆過路亽.° 提交于 2020-01-14 05:43:09
问题 I am creating a custom UITableViewCell with UILabel inside. When I am setting too long text into UILabel, it overlaps bounds of the cell. Looks like I have specified all required properties of UILabel, but still failed to resolve what could be wrong. Possibly I should configure a table or the cell? Could you please advice the way I can fix this? Thanks. 回答1: Have you set the number of lines on the UILabel to greater than 1? The number of lines defaults to 1, and if it is set to 1 then none of

How to fill a Table View in Swift?

杀马特。学长 韩版系。学妹 提交于 2020-01-14 05:25:08
问题 I have written this code: //Basic methods override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. self.DevicesTableView.registerClass(UITableViewCell.self,forCellReuseIdentifier: "cell") self.DevicesTableView.dataSource = self } var array = ["one","two"] func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return array.count } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath

UITableViewCell custom cell using IB loading data

时间秒杀一切 提交于 2020-01-14 05:16:09
问题 From my other question; Using UITableViewCell in a UITableView I've used the IB to create a custom cell. Heres how my code is at the moment: ViewRoutes (Original Table) .h @interface ViewRoutes : UIViewController { IBOutlet UITableView *tblRoute; } @property(nonatomic, retain) UITableView *tblRoute; @end .m #import "ViewRoutes.h" #import "ViewRoutesCell.h" @implementation ViewRoutes @synthesize tblRoute; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self =

Moving content of UITableViewCell on tap

旧时模样 提交于 2020-01-14 04:52:16
问题 If anyone have Google+ App can certainly understand what I'm trying to implement. ( explained here: UIViewController Containment with animation like Google+) I think it has something related with the new effect in iOS 7 Calendar App. ( explained here: Recreating iOS 7 Calendar UIView Animation) - This is a common animation effect that I'm seeing in many apps these days. Months ago, the fellow Rob tried to help me with this his answer: Now I was trying to implement it but there's a problem.