ios4

UIScrollView doesn't remember the position

一曲冷凌霜 提交于 2019-12-22 09:28:15
问题 Has anyone ever had the problem that a UIScrollView , which gets moved by [UIScrollView setContentOffset:...] doesn't "remember" it's new position? It however does, if the user scrolls via touch-and-drag. Symptoms: If the UIScrollView doesn't remember the new position, it "flips" back to the original position it last remembers (which is the position which has been used via touch-and-drag) whenever it's being touched. Interesting: This only happens in 4.0 and didn't happen in 3.1 This only

Is there a BDD solution that presently works well with iOS4 and Xcode4?

梦想的初衷 提交于 2019-12-22 09:07:23
问题 So I've been searching pretty hard for a solid BDD alternative for iOS4 and Xcode4, but everything seems to have either been abandoned a long time ago or sortof working but rather messily. The best solution I've found is called Cedar (main article with a link to a recently updated project tracker), though it has some issues with Xcode4 involving a messy workaround, as noted here. Does anyone know of a better solution? Thanks! EDIT: I decided on using OCUnit and mushing the BDD syntax into the

getter and setters not working objective c

只愿长相守 提交于 2019-12-22 08:08:40
问题 Can I not do this in objective c? @interface Foo : NSObject { int apple; int banana; } @property int fruitCount; @end @implementation Foo @synthesize fruitCount; //without this compiler errors when trying to access fruitCount -(int)getFruitCount { return apple + banana; } -(void)setFruitCount:(int)value { apple = value / 2; banana = value / 2; } @end I am using the class like this: Foo *foo = [[Foo alloc] init]; foo.fruitCount = 7; However my getter and setter's are not getting called. If I

Long iPhone App name to be displayed on multiple lines

旧巷老猫 提交于 2019-12-22 07:58:08
问题 My App name is 17 characters long. When installed on a device it looks like App...Name. Is there any way to display app names on multiple lines? Please help. 回答1: No, You cant dear. I think the iPad supports 15 characters to display the app name in full and iPhone supports 14 characters ... retina display on iPhone did support 15 characters. try Shortening ur app name if u want to display in full. EDIT:- It Depends on the width of the characters, not on no of characters. Like if you use iiiii

Setting a time limit when recording an audio clip?

懵懂的女人 提交于 2019-12-22 07:48:29
问题 I looked for search terms along the lines of the post title, but alas.. I am building an iPhone app using AVFoundation. Is there a correct procedure to limit the amount of audio that will be recorded? I would like a maximum of 10 seconds. Thanks for any help/advice/tips/pointers.. 回答1: AVAudioRecorder has the following method: - (BOOL)recordForDuration:(NSTimeInterval)duration I think that will do the trick! http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference

Apple App Loader/iTunes Connect Problem

随声附和 提交于 2019-12-22 06:52:56
问题 I recently signed up for apple's iOS dev program. The account is activated and ready. However when I try to upload an app, I go to iTunes connect, and it says: "Apple ID does not have permission to access iTunes Connect." and in app loader, it says: "Unable to find registered user with username "user@domain.com" (1001)" Could someone tell me whats wrong? Thanks! 回答1: I got the same error. It turned out that the username field supports more than 1 string and although it showed me only the

Strange behavior when animating UITextField

主宰稳场 提交于 2019-12-22 06:47:10
问题 I'm trying to animate a UITextField but I've been caught by a annoying and strange problem. My animation has the following sequence: In first state the application has the UITextField , the camera UIButton and the cancel UIButton after the camera button that is not been showed because it is been positioned out of the limits of the application. Actually my application has 320 of width and the cancel button origin is (350,7) In second state, when user touches on UITextField , the camera button

Radial gradient draw performance - Can OpenGL-ES improve?

拈花ヽ惹草 提交于 2019-12-22 05:12:01
问题 I'm working on a image manipulation app that overlays a radial gradient over an image loaded from the photo library. On screen I have a slider to dynamically in/decrease the radius of the radial gradient. I've found the performance on the simulator to be just fine, but on an iPhone 3G or 3GS it is much slower to redraw when moving the slider. I'm currently using CGContextDrawRadialGradient for drawing. The steps I'm following for every redraw: Create the graphics context:

UIViewController & UIview dealloc not getting called

混江龙づ霸主 提交于 2019-12-22 04:42:54
问题 I have a Navigation based view controller and in the view controller i have hidden the top navigation bar and use a custom UIView as the navigation bar. The UIView bar has a back button and I use Delegate methods(I have declared a protocol) to communicate to the view controller when the back button is preesed. I use delegate in my CustomNavigation Bar id delegate; and In the main View Controller when i allocate the navigation bar i set the delegate topBar = [[TopNavigationBar alloc]

Scroll to TableViewHeader using “tableView:sectionForSectionIndexTitle:atIndex:” help?

笑着哭i 提交于 2019-12-22 04:35:26
问题 I added a search bar into my TableViewController's header, and I've also added a "{search}" to the "sectionIndexTitlesForTableView" array. Now on the right side, I got the letters of the alphabet + the search symbol on the top... to scroll to the sections of the letters (not the search field) I used this: - (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index{ return index -1; } now when I click the letter A, it scrolls to the