Tag: 可视化

Tableview到Tableview

我是一个完全的新手编程和应用程序build设,所以事先道歉,如果这有一个非常简单的解决scheme。 我已经创build了一个应用程序的底部有一个标签栏,然后在其中一个选项卡上的tableview 。 我已经填充了这个tableview的单元格。 我期待能够select一个单元格,然后根据单元格select,转到另一个具有不同类别的tableview 。 例如第一张桌子视图:狗,蛇,兔子。 然后是第二个表格视图:拉布拉多,Shitzu,狮子狗(如果select“狗”细胞)Python,眼镜蛇,响尾蛇(如果select“蛇”细胞)。 等等。

如何调用popup当我点击在iOS单元格目标c

self.infoView.hidden = NO; self.infoView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.7]; 我想在表格视图中调用瘦 – (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.row==0) { return; } NSMutableDictionary *Tag_Dic = [NSMutableDictionary dictionary]; [Tag_Dic setObject:[NSNumber numberWithInteger:indexPath.row] forKey:@"Tags"]; [[NSNotificationCenter defaultCenter] postNotificationName:@"MoveToNext" object:self userInfo:Tag_Dic]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setInteger:indexPath.row forKey:@"SenderTag"]; [defaults synchronize]; }

分组的UITableView子视图

我经常看到iPhone上的布局,就像我附上的那样。 这是如何做得最好? 使用界面生成器或编程? 如何添加一个子视图到UITableView而不遮挡实际的表格单元格(即如何设置一个页边空白的子视图)? 使用Xcode4.2。

崩溃在iPhone开发下载asynchronous图像

我正在使用这个链接下载asynchronous图像,并将它们显示在我的表视图上,同时我使用相同的asynchronous类到我的下一个视图,但是当上次调用deallocasynchronous类,然后我的应用程序崩溃。 有人请帮助我,在此先感谢。

TableView高度无法在IOS中resize

我正在尝试做这样的事情,我有一个UIViewControler 。 所以在我的故事板,我拖放一个UITableView的视图。 我应该在该表视图中显示一些自定义的行。 但我想dynamic地改变该表视图的高度(根据表视图内的行数)。 我尝试像下面的代码,但没有任何工作到目前为止。 CGRect tvframe = [tableView frame]; [tableView setFrame:CGRectMake(tvframe.origin.x, tvframe.origin.y, tvframe.size.width, tvframe.size.height + 20)]; 我也试过这个 CGRect frame = self.tableView.frame; frame.size = self.tableView.contentSize; self.tableView.frame = frame; 但没有为我工作..请有人告诉我,我该怎么做。 谢谢。

IOS:浏览tableView并在下一个视图中显示表格视图数据

在我的项目中,我正在使用自定义的UITableView ,其中我传递2arrays(图像和名称)数组显示在UITableView 。 现在我想当我点击表的任何单元格查看UITableViewCell的凭据显示在下一个视图中,我采取UIImageView (图像)和UILabel(名称显示)。 我也inputVC,我必须显示图像和名称。 请build议我在另一个视图上显示名称和图像的代码 我正在使用下面的代码 .h文件 #import <UIKit/UIKit.h> @interface FriendsViewController : UIViewController<UISearchDisplayDelegate , UISearchBarDelegate, UITableViewDataSource, UITableViewDelegate> { UITableView *friendslisttable; NSMutableArray *friendslist; NSMutableArray *friendsnamearray; NSMutableArray *profilepicarray; UIImageView * frndprofpic; UILabel *friendnamelabel; NSArray *searchResults; } @end .m文件 – (void)viewDidLoad { [super viewDidLoad]; self.title = @"Friends"; friendslisttable = [[UITableView alloc]initWithFrame:CGRectMake(0,110 , self.view.frame.size.width, self.view.frame.size.height)] ; friendslisttable.delegate […]

如何处理在自定义Tableview单元格iOS中最喜欢的button点击?

我正在开发一个应用程序,我有一个要求。 我必须处理自定义单元格上的“喜欢”button。 我正在创build单元格上的图像的自定义button和设置未select的types我默认给一个用户单击我最喜欢的button单元格上我喜欢的图像我正在改变button图像喜欢所选的最爱。 我正在使用下面的代码 – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellIdentifier = @“CustomCell”; CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath]; if (cell == nil) { cell = [[CustomCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; } cell.favButton.tag = indexPath.section; [cell.favButton addTarget:self action:@selector(handleFavouriteButton:) forControlEvents:UIControlEventTouchUpInside]; return cell; } button操作: -(void)handleFavouriteButton:(id)sender { UIButton *button = sender; NSLog(@"selected favourite button tag %li", […]

如何执行一个模式继续长按

我有一个tableview,我想当我触摸单元格导航到editViewController,当我长触摸(触摸和等待)单元格导航到DetailsViewController。 我在这里得到了这个问题的答案。 现在我有另一个问题,我使用下面的代码将选定的行传递给detailViewContoler – (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender if([[segue identifier] isEqualToString:@"ContectDetails"]) { //get selected contact NSManagedObject *selectedContact=[contacts objectAtIndex:[[self.tableView indexPathForSelectedRow] row]]; //pass selected contact to MyContactAppViewController for editing ContactDetailsViewController *destViewcontroller=segue.destinationViewController; destViewcontroller.contact=selectedContact; //contact is my core data object } } 现在我需要创build一个模式segue和长按方法设置segue标识符“ContectDetails”。

如何在单元格具有自定义高度时自定义UITableView分隔符

我跟着这个post: 如何在iPhone中自定义tableView分隔符 问题是,当我为我的单元格定制高度时,它不能正常工作。 我会告诉你两个图像,两行的是我的单元格自定义高度的结果。 用自定义高度: – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, cell.contentView.frame.size.height – 1.0, cell.contentView.frame.size.width, 1)]; lineView.backgroundColor = [UIColor darkGrayColor]; [cell.contentView addSubview:lineView]; } – (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 50; }

从包含url的数组中添加图片到单元格的imageView – iOS Xcode对象C

只是为了更好地了解这篇文章的内容,最终会在这个问题上结束: 如何从任意数量的url中asynchronous下载预定义数量的图像,将它们添加到字典(或数组,如果更容易),以便按照下载开始的顺序添加它们,而不是按顺序添加它们他们完成了? 这是这篇文章的主要问题,但是为了好的措施,并且让我理解我的意思,我在下面的文章中join了涉及这个问题的具体案例。 我知道这很长,但解释我的情况却相当复杂。 所以,这里什么都不做: 我有一个tableView从不同的数组加载一些事情。 每次启动应用程序时,所有数组都是从JSON获取中创build的,我的想法是通过更新JSON文本文件来更新应用程序中的信息。 JSON文本文件中的一个条目包含URL的图像,我想要添加到tableView单元格的contentview。 我得到了JSON获取工作,并创build了包含来自提取信息的字典“dataDictionary”。 然后,数组创build像这样: – (void)connectionDidFinishLoading:(NSURLConnection *)connection { // Array is created from the dictionary created from the JSON fetch _dataArray = _dataDictionary[@"games"]; // Arrays that will eventually hold info from JSON file is created _Titles = [[NSMutableArray alloc] init]; _Descriptions = [[NSMutableArray alloc] init]; _Date = [[NSMutableArray alloc] […]