小编Ila*_*ian的帖子

UIToolBar背景透明

我试图把UIToolBarUINavigationBar.

   UIToolbar* tempFontSizeToolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(kPaginationToolBarOriginX,kPaginationToolBarOriginY,kPaginationToolBarWidth,kPaginationToolBarHeight)];

    tempFontSizeToolBar.backgroundColor = [UIColor clearColor];

  // create the array to hold the buttons, which then gets added to the toolbar

   NSMutableArray* buttons = [[NSMutableArray alloc] init];
  [tempFontSizeToolBar setTranslucent:YES];
  UIBarButtonItem *fontSizeBarButtonItem;

  fontSizeBarButtonItem = [[UIBarButtonItem alloc]
                         initWithImage:[UIImage imageNamed:KpreviousPageIcon] style:UIBarButtonItemStylePlain target:self action:@selector(movePreviousPage:)];

  [buttons addObject:fontSizeBarButtonItem];

  [fontSizeBarButtonItem release];fontSizeBarButtonItem = nil;

  fontSizeBarButtonItem = [[UIBarButtonItem alloc]
                         initWithImage:[UIImage imageNamed:KnextpageIcon] style:UIBarButtonItemStylePlain  target:self action:@selector(moveNextPage:)];

  [buttons addObject:fontSizeBarButtonItem];

  [fontSizeBarButtonItem release];fontSizeBarButtonItem = nil;

// stick the buttons in the toolbar
  [tempFontSizeToolBar setItems:buttons animated:NO]; …
Run Code Online (Sandbox Code Playgroud)

uitoolbar uinavigationcontroller ios

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

删除除标签外的cell.contentview上的所有子视图

如果我们使用以下代码,我可以删除所有子视图,包括textLabel.我需要删除除contentview titlelabel之外的所有内容

for (int i=0; i < [self.mylist count]; i++) {

    NSIndexPath *lIndexPath = [NSIndexPath indexPathForRow:i inSection:0];

    UITableViewCell *cell = [tableView cellForRowAtIndexPath:lIndexPath];

    for (UIView *view in cell.contentView.subviews) {
        [view removeFromSuperview];
    }
}
Run Code Online (Sandbox Code Playgroud)

任何想法如何避免这种情况

iphone uitableview uiview ipad

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

根据UITextView的内容,tableview单元格的高度

我想根据单元格中textview的内容动态增加tableview单元格的高度.在这里,我创建textview并将该textview作为子视图添加到单元格中.因此根据textview的内容,tableview单元格的高度得到修复.任何人都知道如何做到这一点.

提前致谢

iphone ios5 xcode4.2

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

从NSOperationQueue取消NSOperation

我已经从网址下载了信息,我将这个网址作为NSOperation在NSOperationQueue中发送,我想知道,如何删除特定的NSOperation以下载特定网址的数据,现在我这样做:

AppDelegate *appController = (AppDelegate *) [[UIApplication sharedApplication] delegate];

    for (NSOperation *op in appController.seriesQueue.operations) {

        if ([op isKindOfClass:[MyDowndload class]]) {

            MyDownload *urlInDownload = (MyDowndload *)op;

            if ([urlInDownload.myNew.urlName isEqualToString:[managedObject valueForKey:@"urlName"]] && [urlInDownload.myNew.language isEqualToString:[managedObject valueForKey:@"language"]]) {
                [op cancel];
            }
        }
    }
Run Code Online (Sandbox Code Playgroud)

我在tableview中有信息,所以当我为索引路径删除一行时,我输入此检查,并在[op cancel]行中输入,但我可以在控制台日志中看到该线程仍在下载,如何我能停下来删除吗?

iphone nsoperation nsoperationqueue nsmanagedobject ios

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

在分组样式的iPhone中的表视图

我想将数据库中的数据以分组样式填充到表视图中.记录数量可以变化.(动态变化)

我尝试过,但我只能在带有标题的表格视图中创建不同的部分.

对于EX:我的数据库有5个字段NAME,ADDRESS,CONTACT,SALARY,TECHNOLOGY.

所以我想把name字段值放在我做的部分的标题中.....成功但是当我尝试填充该部分下的其他四个字段值时,它将仅填充1个部分.

第二个问题是,当我在屏幕上上下滚动时,值变得错位意味着随机改变它们的位置.

iphone cocoa-touch uitableview

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