小编kee*_*you的帖子

如何创建全局导航堆栈?

我想要一个全球导航堆栈.当用户更改选项卡或导航到同一选项卡中的新视图时,我想将新视图推送到全局导航堆栈.我希望导航栏中的后退按钮返回上一个视图,该视图有时是不同的选项卡,有时在同一选项卡中有不同的视图.

在此输入图像描述

iphone cocoa-touch objective-c uitabbarcontroller uinavigationcontroller

5
推荐指数
1
解决办法
367
查看次数

在UITableViewView中下载异步多个图像?

如何使用ASIHttpRequest或其他有用的东西在UITableView中下载异步多个图像?

 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
      ..........

      // Creation
      UIImageView *avatar;
      UILabel *content; 

      // Tag the IBOutlets
      avatar = (UIImageView*)[cell viewWithTag:14];
      content = (UILabel*)[cell.contentView viewWithTag:4];

      // Field
      avatar.image = image
      content.text = entryReviewtableView.content;
 }
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch objective-c asihttprequest ipad

2
推荐指数
1
解决办法
1272
查看次数

我怎么能把UITableViewCellEditingStyleInsert放在右边?

我想知道如何将UITableViewCellEditingStyleInsert放在UITableView的右侧,如下图所示: 在此输入图像描述

iphone xcode cocoa-touch ipad

1
推荐指数
1
解决办法
1361
查看次数

我怎样才能重新加载我的UIViewController?

我在viewDidLoad和其他方法中有一个代码,我想重新加载它们如果我点击一个按钮,我已经尝试了setNeedDisplay但它不起作用,我不知道我是否在正确的感觉中使用它?

这是我在viewDidLoad中的代码:

     - (void)viewDidLoad
  {
      // Create the UISegmentedControler "Next Review" and "Previouse Review"
      UISegmentedControl *paginateReviewSegment  = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"Précedent",@"Suivant", nil]];
      paginateReviewSegment.segmentedControlStyle = UISegmentedControlStyleBar;
      [paginateReviewSegment addTarget:self action:@selector(paginateReviews:) forControlEvents:UIControlEventValueChanged];

       UIBarButtonItem *paginateBarButton = [[UIBarButtonItem alloc] initWithCustomView:paginateReviewSegment];
       self.navigationItem.rightBarButtonItem =  paginateBarButton;

      [super viewDidLoad];

     // Get the review selected
      entryReview = [[entriesReview getEntries] objectAtIndex:self.reviewSelected];

    // Resize the UIScrollView
     [self.scrollView setScrollEnabled:YES];
     [self.scrollView setContentSize:self.contentView.frame.size];

    // Add UIView "Content" to UIScrollView
    [self.scrollView addSubview:self.contentView];

   // Set the user name
   userNameLabel.text = entryReview.userName;

   .....
   }
Run Code Online (Sandbox Code Playgroud)

这是我想用来重新加载UIView的动作:

  - (void)paginateReviews:(UISegmentedControl*)sender
  { …
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch objective-c uiviewcontroller uiview

0
推荐指数
1
解决办法
6073
查看次数

NSOperation的倍数参数?

我在我的应用程序中使用NSOperationQueue,我想为我的操作设置多个参数,我该怎么做?

   NSOperationQueue *queue = [[[NSOperationQueue alloc] init] autorelease];
   NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(methodCall) object:nil];
  [queue addOperation:operation];
  [operation release];
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch nsoperation nsoperationqueue nsinvocationoperation

0
推荐指数
1
解决办法
2089
查看次数

为什么heightForHeaderInSection在iOS 4.3中不起作用?

为什么heightForHeaderInSection和heightForFooterInSection在iOS 4.3中不起作用,它在5.0中有效?

  -(CGFloat)tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section
  {
     if (section == 0) {
        return 10.0;
     }
     return (tableView.sectionHeaderHeight - 20);
  }

  -(CGFloat)tableView:(UITableView*)tableView heightForFooterInSection:(NSInteger)section
  {
     if (section == ([self.optionsArray count] - 1)) {
        return 15.0;
     }
     return (tableView.sectionFooterHeight - 20);
  }
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch uitableview objective-c-2.0 ipad

0
推荐指数
1
解决办法
1138
查看次数