我是 iphone 开发的新手。我正在开发一个 iphone 应用程序,例如从 json 解析的 sms 集合在该应用程序中具有第一个类别列表,例如有趣的短信,当单击爱短信时 UITableview 中的爱短信然后我在 uitablview 中获得爱短信列表 ....点击特定爱短信后然后我在视图中显示特定的短信......但我的问题是当点击从爱短信到主要类别的返回选项时,它的响应速度很慢我的返回按钮代码是
-(IBAction)btnBackClicked:(id)sender
{
btnAddFav.hidden = FALSE;
btnFavList.hidden = FALSE;
[self startActivityIndicator1];
int Type;
indexId--;
if(indexId < 0)
indexId = 0;
NSMutableDictionary *tempDict1;
for(int i=0;i<[test.JsonPageList count];i++)
{
tempDict1 = [[NSMutableDictionary alloc]init];
tempDict1 = (NSMutableDictionary *)[test.JsonPageList objectAtIndex:i];
if (indexId == 0)
{
tempDict1 = (NSMutableDictionary *)[test.JsonPageList objectAtIndex:0];
Type = [[tempDict1 valueForKey:@"type"] intValue];
if (Type == 0)
{
// lblTitleofApp.hidden = TRUE;``
btnBack.hidden = TRUE;
NSArray *arr=[[tempDict1 valueForKey:@"desc"] componentsSeparatedByString:@";"];
NSString *subStar = @"|@$:";
NSString *sub=@":$@|";
[test.arrTitle removeAllObjects];
[test.arrnew removeAllObjects];
[test.arrId removeAllObjects];
[test.arrImages removeAllObjects];
for (int i=0; i<[arr count]-1; i++)
{
[test.arrTitle addObject:[[arr objectAtIndex:i] substringToIndex:NSMaxRange([[arr objectAtIndex:i] rangeOfString:sub])-4]];
[test.arrnew addObject:[[arr objectAtIndex:i] substringFromIndex:NSMaxRange([[arr objectAtIndex:i] rangeOfString:sub])]];
[test.arrId addObject:[[test.arrnew objectAtIndex:i] substringToIndex:NSMaxRange([[test.arrnew objectAtIndex:i] rangeOfString:subStar])-4]];
[test.arrImages addObject:[[arr objectAtIndex:i] substringFromIndex:NSMaxRange([[arr objectAtIndex:i] rangeOfString:subStar])]];
}
}
}
如何从特定类别中快速获取 privious 主要类别列表 ....当单击后退按钮时,我可以使用哪个概念来解决这个问题,对不起简单和糟糕的英语单词,请指导我