小编Jos*_*ell的帖子

UITableView部分详细说明滚动时绘图错误

我有一个UITableView,我是showng数据indexPath.section,但是,当我快速滚动我的表视图时,它的数据保持重叠.如何解决这个问题?

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

    static NSString *CellIdentifier = @"Cell";


    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
        }
    switch(indexPath.section)
    {
    // case 0 to 10;
    //values change if I scroll my table 
}
Run Code Online (Sandbox Code Playgroud)

}

iphone scroll uitableview

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

在本地通知的警报正文中显示图像

我正在使用本地通知,但我想在警报的邮件正文中放置一个图像.我怎样才能做到这一点?

cocoa-touch ios uilocalnotification

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

如果使用==语句检查NSString相等性

我正在使用一些Objective-c代码进行服务器调用.如果它返回为a @"yes",它将执行操作.由于某种原因,// DO ACTION HERE从未达到过该部分.

NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];
NSString *returnStringResults = returnString;
NSString *yesText = @"yes";

if (returnStringResults == yesText) {
    testLabel.text = @"Success";
    // DO ACTION HERE
}
Run Code Online (Sandbox Code Playgroud)

cocoa objective-c string-comparison nsstring

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

检测应用程序在启动后第一次打开时

我想在应用程序安装和第一次打开时在视图控制器上显示帮助消息.

有没有一种方法可以用来做到这一点?

cocoa-touch uiviewcontroller ios

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

Google App Engine错误:未找到匹配的索引.(JAVA)

我正在写一个查询,但它总是说"找不到匹配的索引".我不知道为什么.我的代码如下:

Query query = pm.newQuery(Classified.class);
query.setFilter("emp_Id == emp");
query.setOrdering("upload_date desc");
query.declareParameters("String emp");
List<Classified> results = (List<Classified>)query.execute(session.getAttribute("emp_Id").toString()); 
Run Code Online (Sandbox Code Playgroud)
<?xml version="1.0" encoding="utf-8"?>
<datastore-indexes autoGenerate="true">
  <datastore-index kind="Classified" ancestor="false">
    <property name="emp_Id" direction="asc" />
    <property name="category" direction="asc" />
    <property name="upload_date" direction="desc" />
  </datastore-index>
</datastore-indexes> 
Run Code Online (Sandbox Code Playgroud)

我已经添加了上面的索引,但它没有帮助.

java google-app-engine jdo

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

添加到阵列时保留计数会增加吗?

我只是想知道:如果将对象的保留计数添加到Objective-C中的数组或字典中,它是否会增加?将数据添加到数组或字典后,我可以立即释放它吗?

objective-c nsdictionary nsarray ios retaincount

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

将NSStrings添加到可变数组

我创建了一个可变数组,我有两个NSString变量.现在我想将这两个NSStrings 添加到我的数组中.这怎么可能?谢谢.

cocoa objective-c nsstring nsmutablearray

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

查找NSMutableDictionary和NSMutableArray使用的实际内存空间

如何获得特定应用程序NSMutableDictionary或NSMutableArray特定应用程序的内存大小?

memory cocoa-touch objective-c ios

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

将NSDictionary复制到NSArray

我有一个变量声明为NSDictionary.如何将其复制到extern const NSArray变量?例如:

NSMutableDictionary *selectedItem = [self.dataArray objectAtIndex:indexPath.row];
[selectedItem setObject:[NSNumber numberWithBool:targetCustomCell.checked]     
                 forKey:@"checked"];
Run Code Online (Sandbox Code Playgroud)

objective-c nsdictionary nsarray ios

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

将数组中的字符串与另一个字符串进

我想知道如何比较一个字符串和一个数组,即,如果我的数组列表已经{"abc", "pqr", "xyz"}和新字符串让我们说"mno"是键入,它应该与我以前的数组列表进行比较.我怎样才能做到这一点?提前致谢.

arrays objective-c ios

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