在 Wikipedia 的移动应用程序中,它们具有下拉效果,如果您单击该行,它会打开该行的内容并将其插入到页面中。例如,行可能是职业、商业生活和个人生活,如果单击职业行,它会在职业和商业生活行之间插入职业内容。如果您再次单击“职业”行,则“职业”内容会消失,您将回到仅一行。我希望我的内容采用 HTML 格式,所以我假设我需要以某种方式使用 UIWebView 执行此操作,可能与 UITableView 结合使用。我将如何创建这样的效果?
user2959179
问问题
235 次
2 回答
1
你为什么不使用 UIActionSheet....尝试类似...
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Take photo",@"Choose existing", nil];
actionSheet.actionSheetStyle=UIActionSheetStyleBlackTranslucent;
[actionSheet showFromRect:[sender frame] inView:self.view animated:YES]; //sender is the cell
也在委托方法中实现动作.....
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if(buttonIndex==0)
{
// blah blah
}
else if(buttonIndex==1)
{
//sec index action...
}
}
你会得到类似......
于 2013-11-06T06:49:58.973 回答
0
你所说的那种流动,人们称之为手风琴。在 google 中搜索iphone sdk 手风琴 uitableview一词,您将获得大量可用链接。您可以从这里下载示例代码。
于 2013-11-06T06:58:29.690 回答