草庐IT

tableView_alarm

全部标签

ios - 从 TableView 和 coreData 中删除行

我在从充满coreData对象的tableView中删除行时遇到一些问题。尝试这样做:-(void)tableView:(UITableView*)tableViewcommitEditingStyle:(UITableViewCellEditingStyle)editingStyleforRowAtIndexPath:(NSIndexPath*)indexPath{if(editingStyle==UITableViewCellEditingStyleDelete){[self.tableViewbeginUpdates];NSManagedObject*managedObject=

ios - Tableview 重用单元格并首先显示错误数据

您好,这个问题困扰我有一段时间了。我想阻止tableview重复使用单元格。当我滚动时,它一直显示错误的信息,然后显示正确的信息,比如几毫秒。我怎样才能阻止tableview重用单元格,或者我怎样才能重用单元格并让它不这样做。funcnumberOfSectionsInTableView(tableView:UITableView)->Int{return1}functableView(tableView:UITableView,numberOfRowsInSectionsection:Int)->Int{returncats.count}functableView(tableView

ios - TableView 部分分隔线

我想在表格View部分添加分隔线。目前标题部分View的代码将是:-(void)tableView:(UITableView*)tableViewwillDisplayHeaderView:(UIView*)viewforSection:(NSInteger)section{//recastyourviewasaUITableViewHeaderFooterViewUITableViewHeaderFooterView*header=(UITableViewHeaderFooterView*)view;header.backgroundView.backgroundColor=[UIC

ios - 在 Storyboard 中调整 TableViewController 的 TableView 大小

我有一个用Storyboard创建的UITableviewController。现在我想改变表格View的X和Y坐标(具体来说我想把表格View往下放一点)。Storyboard中有一个选项,我可以在其中设置此参数或更改表格View的大小?我找不到了我试过查看尺寸检查器,但看起来X和Y参数被禁用了。 最佳答案 UITableViewController的tableview是主视图,所以我们不能在storyboard中调整它。如果你想调整大小试试这个。在你的UITableViewController中。-(void)viewDidAp

ios - tableview ios 中带有 UILabel 的单元格的动态高度

我正在开发一个显示消息和用户图像的聊天应用程序。我有一个表格View和一个自定义单元格。单元格有一个UIlabel和UIImage。我尝试了各种方法来根据标签的内容文本动态调整单元格高度。我在Storyboard本身中设置了numberofLines=0并将单元格高度设置为常量,以便可以容纳多行.但它不显示多行,至于高度,我使用了自动尺寸但效果不佳。我还使用了以下link我正在使用类型为messageTableViewCell的自定义单元格,其中具有标签属性。这是快照:-我在viewcontroller.m中的代码-(void)viewDidLoad{self.tableView.es

ios - 为 TableView 中的所有单元格设置标签的正确方法

我在tableView中使用了一个按钮我在其中得到indexPath.row什么时候按下。但它只有在单元格可以在没有scroll的情况下显示在屏幕上时才能正常工作。.一旦tableView可以滚动并且我滚动tableview,indexPath.row返回的是一个错误的值,我注意到最初设置了20个对象,例如Check只是打印了9次没有20。-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{UITableViewCell*cell=[table

objective-c - NSDictionary 到 TableView

因为我是Stackoverflow的新手,所以我还不能评论某人的答案。(我的声誉是16..)。我有一个关于这个答案的问题:HowdoIputthisJSONdataintomytableview?Pleasehelpme,I'mlivinginanightmare:)Fulvio说你必须使用[eventNameListaddObject:event];和[eventNameListobjectAtIndex:indexPath.row];来存储和获取事件数据但是。addObject是一个NSMutableSet方法,而objectAtIndex:indexPath.row不是。所以我不

ios - 如果 ViewController 包含 TableView 作为根目录,如何将它添加到导航 Controller ?

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。关于您编写​​的代码问题的问题必须在问题本身中描述具体问题—并且包括有效代码以重现它。参见SSCCE.org寻求指导。关闭9年前。Improvethisquestion我正在尝试将UIViewController(AddProjectViewController)添加到导航Controller(navigationController),它有一个tableView设置为根,它不起作用。这就是我设置文件的方式:http://d.pr/y8rt代码在ProjectsController.m-请帮忙:(

ios - 如何在我的应用程序中将我的 iOS 应用程序列表显示到 TableView Controller ?

我想做的是想出一种方法来在我的带有UITableViewController的应用程序中的iTune商店中显示我所有的iOS应用程序。例如,当我在iTune中搜索关键字“xcodechina”时,它会以表格View显示iTune商店中所有已发布的产品。我只想在我自己的应用程序中执行此操作。如果像RSS一样有特定的xml链接,那会很容易做到,但好像没有。还有其他线索吗?谢谢 最佳答案 Apple提供了一个iTunesWeServicesAPI,您可以在这个地址找到:http://www.apple.com/itunes/affilia

objective-c - 从详细 View 返回后, TableView 不再是 searchResultsTableView

我正在使用基于本教程的UISearchDisplayController:http://developer.apple.com/library/ios/#samplecode/TableSearch/Introduction/Intro.html我在带有该搜索Controller的导航Controller中有一个TableView。和往常一样,您可以搜索,点击搜索结果并转到详细View。我正在使用如下代码来检测当前TableView是否为searchResultsTableView。-(NSInteger)numberOfSectionsInTableView:(UITableView