English 中文(简体)
在 IOS 中创建自定义 UIT 可访问
原标题:Creating a Custom UITableView in IOS

我正在使用 iOS5 SDK 和 StoryBoards 来开发 iPhone 上的 App 。 我正在为 App 中的兄弟列表创建一个视图, 其格式应该如下 :

b1 | b2 | b3
b4 | b5 | b6
b7 | b8 | b9
.... | .... | ....

b 对应于一个配有UIIMage和两个标签的基底基底的基底牢房。

基本上,我试图在行和每三个朋友(校友)中为下一个条目显示一个新的行。在绕行搜索后,我发现与此相似的解决方案是创建一个垂直的表格,每个单元格都包含一个横向表格,包含包含伙伴信息的单元格,并进行适当的定制,例如变换等。

现在我知道该怎么做了,所以我的问题是,这是这样做的最好办法,还是有更好的解决办法?

谢谢 谢谢

问题回答

除了建立你自己的控制之外, 我要做的是:

  • Create a cell that shows up to 3 buddies
  • Create a data source class that returns the correct number of rows (given that there are 3 buddies per row)
  • The data source should initialise your custom cell to the (up to) 3 buddies for that row.

这里是一个链接, 与关于谁为 UITView 创建自定义单元格的教官有关 。

http://mobloorchard.com/ios-development-tutor-serviews/





相关问题
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 ...

热门标签