ios5

-tableView:cellForRowAtIndexPath: is not getting called

烈酒焚心 提交于 2019-12-24 00:16:36
问题 I've UITableView in UIViewController and I've connected through outlet and delegete and datasource are assigned to self. numberOfSectionsInTableView and numberOfRowsInSection are getting called i tried by using NSLog but cellForRowAtIndexPath is not getting call my code looks like - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@" cellForRowAtIndexPath "); static NSString *CellIdentifier = @"CurrencyCell"; CurrencyCell *cell =

Rearranging UITableViewCells causes cell contents to break

吃可爱长大的小学妹 提交于 2019-12-23 23:52:56
问题 I have an iOS4 iPad app that I'm upgrading to iOS5, and there is one issue that I don't fully understand what is going on. The view in question uses a UITableView with a number of subclassed UITableViewCells to display a series of different (and modifiable) fields. Each cell contains UI buttons, UITextFields , etc etc, and is used to readily store a variable amount of controls. Via tableView:canMoveRowAtIndexPath: we've enabled the ability for the user to rearrange the order of the rows using

Are Images assigned in a xib cached?

让人想犯罪 __ 提交于 2019-12-23 23:31:14
问题 If I assign an image to a UIImage view in a xib, is that image cached so that if I access the image using UIImage imageNamed: I am getting cached Image data? I'm using iOS 5.1 回答1: UIImage imageNamed: does its own cacheing of any images you use. The first time you use it for a given image, it'll populate the cache, and subsequently it'll use the cached version. UIImageView in Interface Builder takes a string to tell it what image to use. It appears that the object that is actually encoded in

MKAnnotation not responding on tap

痞子三分冷 提交于 2019-12-23 23:13:39
问题 I am displaying several pins on map just like this: for (int i = 0; i < points.count; i++) { if([[[points objectAtIndex:i] objectForKey:@"lat"] class] != [NSNull class]) { southWest.latitude = MAX(southWest.latitude , [[[points objectAtIndex:i] objectForKey:@"lat"] doubleValue]); southWest.longitude = MIN(southWest.longitude, [[[points objectAtIndex:i] objectForKey:@"lon"] doubleValue]); northEast.latitude = MIN(northEast.latitude, [[[points objectAtIndex:i] objectForKey:@"lat"] doubleValue])

Set UIToolbarPosition for created UIToolbar

时间秒杀一切 提交于 2019-12-23 19:25:55
问题 I'm writing app which is aimed only for iOS5 devices, so I'm trying to maximize usage of new appearance API. I can change background of my UIToolbar with following method: [[UIToolbar appearance] setBackgroundImage:<myImage> forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault]; Everything works fine, but I'm looking for more customization, so I was wondering about usage of UIToolbarPosition and I run into some problems. Using InterfaceBuilder or adding UIToolbar

ios5 background management different from ios4?

折月煮酒 提交于 2019-12-23 19:11:20
问题 I need to make some url request when my application goes to background I'm developing with the simulator and I've just noticed that when I press the power button to lock the screen the appDelegate method - (void)applicationDidEnterBackground:(UIApplication *)application with iOS 5 is automatically called, but this doesn't happen with iOS 4 is it right? can someone try if on real devices there's the same result? is it possible to detect the power button pressure and differentiate the actions

SKProductsRequest Returning Empty Results

萝らか妹 提交于 2019-12-23 19:08:09
问题 I have looked over some of the other answers and they don't seem to help my situation. I have a new app that is nearly ready for its initial release and I am just working on the In App Purchase section. I have used IAP in a previous app so I thought the move over should be straight forward. The problem is, however, that whenever I run SKProductsRequest, it returns an empty results set. I am using the following to make the request productIdentifierList = [[NSMutableArray alloc] init];

what is the difference between bounded and unbounded device?

拈花ヽ惹草 提交于 2019-12-23 17:53:14
问题 I’m new to both iOS and BLE, so kindly bear with me if this question is very basic. What is the distinction between bounded and unbounded devices? I’m working with CBCentralManager for BLE in iOS, and I’m trying to figure out how to pair them through CBCentralManager . 回答1: You don't need to do anything different app, iOS will handle the binding if required. Bounded connections are in a way "paired" to the iOS device. Once bounded they will not communicate to any other device. Bounding is

Attaching a image to an email in an app in ipad in ios6

痞子三分冷 提交于 2019-12-23 17:32:15
问题 I am trying to attach images to the email and send the email to my email add. The problem is that when i send out an email with 4 or 5 images attached, the app keeps processing for ever and eventually gets hanged and crashes and doesn't send the email. It is working fine with one image. I am thinking it is because of the size of the images combined together. Btw, I am using iOS 6.. How do i restrict the size of the files or images sent? Or there might be other issues involved? The same app is

Does dequeueReusableCellWithIdentifier work with ARC?

不打扰是莪最后的温柔 提交于 2019-12-23 17:27:56
问题 In iOS5, using ARC and prototype cells for tableView on storyboard, can I replace the code below: static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } // Configure the cell... return cell; With this simple code?: UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];