uitableview

UITableView cell are overlapping

≯℡__Kan透↙ 提交于 2020-02-04 05:56:06
问题 I'm implementing a tableView with section index. where my tableViewCells are overlapping whenever the rows are more than one in any particular section. Here is my code. ![- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return \[self.keys count\]; } - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { // return \[\[\[UILocalizedIndexedCollation currentCollation\] sectionTitles\] objectAtIndex:section\]; return \[keys objectAtIndex

UITableView cell are overlapping

╄→гoц情女王★ 提交于 2020-02-04 05:56:05
问题 I'm implementing a tableView with section index. where my tableViewCells are overlapping whenever the rows are more than one in any particular section. Here is my code. ![- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return \[self.keys count\]; } - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { // return \[\[\[UILocalizedIndexedCollation currentCollation\] sectionTitles\] objectAtIndex:section\]; return \[keys objectAtIndex

moveRowAtIndexPath doesn't refresh the cell's content

别等时光非礼了梦想. 提交于 2020-02-03 04:22:26
问题 iOS 5 finally added a moveRowAtIndexPath:toIndexPath: method to UITableView . Problem is, calling it only moves the row, it doesn't update/redraws it. The only way to do so seems to be by finding the cell and calling setNeedsDisplay directly. But this is tricky since you never know whether the cell already got moved or not. I can't call reloadRowsAtIndexPaths: either, since I'm not allowed to have 2 animations applied to a single row inside the same beginUpdates-endUpdates block. There are

How to connect outlet from storyboard to UITableViewCell class Xcode 11

六月ゝ 毕业季﹏ 提交于 2020-02-03 04:12:32
问题 How can we connect outlet with the table view custom cell class in storyboard? As in earlier Xcodes, there is a button to open two windows in storyboard screen but in new Xcode that button is missing. Please guide how to achieve that functionality. 回答1: Click here (1), and then select the file in the right panel that appears (2), step 1 and 2 in the image, then you can connect outlet as always ;) 回答2: Here you have how to open the tab to drag the outlets from the view to the viewController in

Best Practices: Fast UITableView Scrolling?

无人久伴 提交于 2020-02-03 02:10:15
问题 I know there has been a lot of discussion around fast scrolling. Apple provides excellent examples: http://developer.apple.com/library/ios/#samplecode/TableViewSuite/Introduction/Intro.html I will have a custom UITableViewCell that has 2 UIImageView's and 3 UILabels as subviews. If I just add them as subviews to the content view will my scrolling be slow? Would it be best to just draw these? 回答1: The answer I got from the UIKit guys at WWDC this year was "it kinda depends on what you're doing

iOS – Weird exception

流过昼夜 提交于 2020-02-03 01:47:13
问题 I'm getting a strange exception in Xcode 4.2.1 (ARC-enabled project) that I can't track down to the root of the problem. This is what the exception looks like: 2012-03-18 22:19:32.855 Project[14225:707] +[UIPickerTableViewTitledCell isEqualToString:]: unrecognized selector sent to class 0x3f2bbec4 2012-03-18 22:19:32.859 Project[14225:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIPickerTableViewTitledCell isEqualToString:]: unrecognized selector

iOS11 & iPhone X 适配指南

巧了我就是萌 提交于 2020-02-03 00:48:43
苹果WWDC开发者大会上,终于发布了大家期待已久的iOS 11,有些新特性功能确实出人意料。不过大的方面苹果貌似也就 AR 和 GM 机器学习了,9月13日凌晨1点,苹果开了新品发布会,相信大家都已经知道Phone X 的刘海了,看起来不是很雅观,对于iOS开发者来说,适配工作也带来了麻烦,iOS11在新旧API 方面做了新的改动,未来App Store就会出现很多大量的APP更新,针对iOS11和iPhone X的适配。 下面针对已经了解的出现的问题进行适配的说明。 屏幕未充满? 相信一部分开发者已经在着手适配iPhone X 和iOS11 了,xcode9测试版运行自己的项目会发现项目没有充满屏幕,上下会有黑色区域的情况,大家别慌,这是没有设置对应的启动图,iPhone X对应像素 1125 * 2436 大家可以自己添加图片或者准备一张尺寸:1125 * 2436的启动图片, 移动到LaunchImage的Finder目录中, 并在LaunchImage中的Contents.json文件中增加 (注意Json格式): { "extent" : "full-screen", "idiom" : "iphone", "subtype" : "2436h", "filename" : "图片名字.png", "minimum-system-version" : "11.0",

Swift 2.0 Core Data - TableView not reading NSManagedObject

坚强是说给别人听的谎言 提交于 2020-02-02 16:02:34
问题 In first view controller i saved data in core data with uitextfields, i wanted to tableview to read that data in second view controller, i got no errors but i got no display of data in tableview cells. In first VC i made a property of NSManaged object, and in second VC i retrieve that object, put it in tableview but no data is displayed. This is crucial to my understanding about how tableview can read data from core data, thank you a lot. First VC import UIKit import CoreData class

Swift 2.0 Core Data - TableView not reading NSManagedObject

白昼怎懂夜的黑 提交于 2020-02-02 16:01:09
问题 In first view controller i saved data in core data with uitextfields, i wanted to tableview to read that data in second view controller, i got no errors but i got no display of data in tableview cells. In first VC i made a property of NSManaged object, and in second VC i retrieve that object, put it in tableview but no data is displayed. This is crucial to my understanding about how tableview can read data from core data, thank you a lot. First VC import UIKit import CoreData class

+/- quantity of products in Cart View Controller with buttons each on a TableViewCell, which gets default quantity as integer from an array

二次信任 提交于 2020-02-02 13:57:12
问题 i am developing an app that you could add items to the Cart from MenuVC, then you can go to CartVC to view what is on your cart and increase or decrease quantity of items to be ordered. I cant make quantity label to change, don't know if thats because i get quantity from an array? is it unmutable? Thank you for your help Here is my cell import UIKit class BasketCell: UITableViewCell { @IBOutlet weak var quantityLabel: UILabel! @IBOutlet weak var itemLabel: UILabel! @IBOutlet weak var