English 中文(简体)
如何在表格视图中显示来自 NSMmutatarary 的数据?
原标题:how to display data from a NSMutablearray in a Table View

I 尝试以我储存在NSmubableArra 中的每个用户的图像、姓名和姓名初始化表格视图。 在这个变异中,我保存了我为存储用户数据而创建的分类,其图案如下:

Result SearchCranger {NSIntger *userID;NSString *user用户Name;NSString *userSurname;NSString *userSurname;NSString *userThumb;}

I 阅读了表格View 的文件,但我仍然有疑问和问题,无法在表格View中显示数据(使用这些对象看起来相当复杂)。你能帮助我开始吗?

最佳回答

我猜你有一个自定义 UITable ViewCell 。

直接用于 CellForRowAtIndexPath UITableView 的代表(设置图像):-

yourCustomCellObject.yourImageViewINCustCell.image=[UIImage imageNamed:[(yourClassToStoreData *)[yourNSMutableArray objectAtIndex:indexPath.row] userThumb]];

同样,您也可以以同样的方式设置其他控制元素。

这只是你如何做的一个例子。 我猜你已经将数据存储在一些类对象上, 并将其添加到 NSMtableAray 中。

问题回答

暂无回答


上一篇:
下一篇:


相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...

热门标签