Iphone 使用表视图的图像库

Iphone 使用表视图的图像库,iphone,uitableview,uiimageview,Iphone,Uitableview,Uiimageview,我正在创建一个应用程序,它有一个模块,比如图像库。当我解析一个XML时,它会给出一些图像,比如说10个,并显示在表的行中。现在,当从表中选择一行时,在我的下一个视图中,它应该在表的行中显示10个图像的缩略图。一行应包含4个小图像,以此类推 有什么好的编程建议吗 感谢使用TttThumbsviewcontroller from Three20: 教程: 感觉自己是本地人,完全满足您的需求: 从三个位置使用TTThumbsViewController 20: 教程: 感觉自己是本地人,完全满

我正在创建一个应用程序,它有一个模块,比如图像库。当我解析一个XML时,它会给出一些图像,比如说10个,并显示在表的行中。现在,当从表中选择一行时,在我的下一个视图中,它应该在表的行中显示10个图像的缩略图。一行应包含4个小图像,以此类推

有什么好的编程建议吗


感谢使用TttThumbsviewcontroller from Three20:

教程:

感觉自己是本地人,完全满足您的需求:


从三个位置使用TTThumbsViewController 20:

教程:

感觉自己是本地人,完全满足您的需求:


如果不需要对这些单元格重新排序,则可以通过子类化UITableviewCell来实现,其中每个单元格包含4个按钮。学员可发送内部润色信息

更新:

自定义单元格示例:

  @protocol MyCellDelegate <NSObject>
  - (void)notifyCell:(MyCell *)cell didTouchupInside:(UIButton *)innerButton;
  @end

  @interface MyCell : UITableViewCell {
  @private
      // easy to understand button example
      // you can use array or dictionary to manage your buttons.
      UIButton *mButton1;
      UIButton *mButton2;
      UIButton *mButton3;
      UIButton *mButton4;

      // Other member variables.
  }

  @property (nonatomic, assign) id <MyCellDelegate> delegate;

  - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier delegate:(id)delegate;

  @end
@protocol-mycelldegate
-(void)notifyCell:(MyCell*)单元格didTouchupInside:(UIButton*)innerButton;
@结束
@接口MyCell:UITableViewCell{
@私人的
//易于理解的按钮示例
//您可以使用数组或字典来管理按钮。
UIButton*mButton1;
ui按钮*mButton2;
UIButton*mButton3;
UIButton*mButton4;
//其他成员变量。
}
@属性(非原子,赋值)id委托;
-(id)initWithReuseIdentifier:(NSString*)reuseIdentifier委托:(id)委托;
@结束

通过MyCellDelegate,客户端可以知道在MyCell对象上发生了什么。

如果不需要对这些单元格重新排序,则可以通过子类化UITableviewCell来实现,其中每个单元格包含4个按钮。学员可发送内部润色信息

更新:

自定义单元格示例:

  @protocol MyCellDelegate <NSObject>
  - (void)notifyCell:(MyCell *)cell didTouchupInside:(UIButton *)innerButton;
  @end

  @interface MyCell : UITableViewCell {
  @private
      // easy to understand button example
      // you can use array or dictionary to manage your buttons.
      UIButton *mButton1;
      UIButton *mButton2;
      UIButton *mButton3;
      UIButton *mButton4;

      // Other member variables.
  }

  @property (nonatomic, assign) id <MyCellDelegate> delegate;

  - (id)initWithReuseIdentifier:(NSString *)reuseIdentifier delegate:(id)delegate;

  @end
@protocol-mycelldegate
-(void)notifyCell:(MyCell*)单元格didTouchupInside:(UIButton*)innerButton;
@结束
@接口MyCell:UITableViewCell{
@私人的
//易于理解的按钮示例
//您可以使用数组或字典来管理按钮。
UIButton*mButton1;
ui按钮*mButton2;
UIButton*mButton3;
UIButton*mButton4;
//其他成员变量。
}
@属性(非原子,赋值)id委托;
-(id)initWithReuseIdentifier:(NSString*)reuseIdentifier委托:(id)委托;
@结束

通过MyCellDelegate,客户端可以知道MyCell对象上发生了什么。

如果我想选择要在下一个视图中显示的特定图像,我该怎么做。为此,我必须指定uibutton的哪些属性..您可以将目标和操作添加到uibutton,并通过委托传输这些事件。您可以为这个子类化单元格定义一个自定义协议,以便通过代理发送消息。如果我想选择要在下一个视图中显示的特定图像,我必须做什么。为此,我必须指定uibutton的哪些属性..您可以将目标和操作添加到uibutton,并通过委托传输这些事件。您可以为该子类化单元定义自定义协议,以便通过委托发送消息。