iphone

How can I get current scroll position on UIWebView

Hi I have a UIWebView And how can i get It's scroll position ? I know, that UIWebView has a UIScroller subview. But I can't get offset of this UIScroller ((( ...

Do I have to release the nib's top level objects if I don't load the nib manually?

As I understand it, I do have to release the top level objects (including window, custom controller objects, ...) from my Nib file, if I load it programmatically by myself. But do I have to care about them in an simple view-based application that has only one main nib file? And would I have to care about them when having an view-based ...

Why does my iPhone app crash when not launched by xcode

The iPhone app I am developing has a strange quirk where it runs ok when xcode has launched it, but not when launched directly on the device. I've checked the crash logs and the exception seems to be occurring in libxml2.2 in xmlParseCharData. It's quite a big xml document that is being parsed so I think that might be the problem. I t...

Which are the Top Level Objects I need to create Outlests for in the File's Owner of my Nib, so that I have less memory problems?

Apple says, that I need to have Outlets in my File's Owner for all my top level objects in a Nib file. As much as I know, these objects are NOT the File's Owner itself (would make no sense, right?) and the First Responder. I am unsure about: The View object in the Nib, and any controller object in the nib. Do I need an outlet for thos...

What do I have to consider in an multiview-application, when it comes to low memory warnings?

Somewhere I was reading that I would run into memory problems when I give up a view temporary due to an low memory warning (loading it again as soon as the user wants to see it), if theViewController class does not do things like this on every outlet of that view: -(void)dealloc { [myView release], myView = nil; [myLabel release...

Which iPhone OS memory management rules and how-to's do you know? What great links do you have for that topic?

Currently I am jumping into the ice cold water called "memory management in iPhone OS". Here's one rule i've learned: Every time I see an alloc in my method, I will release that corresponding variable at the bottom of the method. Every time I create an @property(...) in my header file which says copy or retain, I put a release message...

Is it possible to have post-debugging build steps/triggers in XCode?

I want to run some code coverage analysis (using CoverStory) on our iPhone app's unit tests in XCode automatically when the tests run. the problem is that we're using the Google Toolbox for Mac, and the way that the tests seem to run doesn't actually generate code coverage reports from gcov, so the analysis i get is out of date unless i...

cocos2d: LabelAtlas text alignment?

Is there a way in cocos2d 0.7.1 to specify the text alignment in a LabelAtlas? I'm using a LabelAtlas for a score (displayed in the upper right corner) but when the score goes above 10, the second digit is cut off. I can implement code to detect that and move the LabelAtlas, but is there a way to have cocos2d do it for me? Thanks. ...

Programmatically retrieve memory usage on iPhone

I'm trying to retrieve the amount of memory my iPhone app is using at anytime, programmatically. Yes I'm aware about ObjectAlloc/Leaks. I'm not interested in those, only to know if it's possible to write some code and get the amount of bytes being used and report it via NSLog. Thanks. ...

Scrolling with two fingers with a UIScrollView

I have an app where my main view accepts both touchesBegan and touchesMoved, and therefore takes in single finger touches, and drags. I want to implement a UIScrollView, and I have it working, but it overrides the drags, and therefore my contentView never receives them. I'd like to implement a UIScrollview, where a two finger drag ind...

Resizing a UIView to make it scrollable in a UIScrollView

I added a UIScrollView in my appDelegate, and then did scrollView.contentSize = CGSizeMake(720, 480); scrollView.showsHorizontalScrollIndicator = YES; scrollView.showsVerticalScrollIndicator = YES; scrollView.delegate = self; [scrollView addSubview:viewController.view]; [window makeKeyAndVisible]; Where view Controller loads up a UIV...

NSURLRequest - encode url for NSURLRequest POST Body (iPhone objective-C)

I am sending a post using NSURLRequest. NSURL *url = [NSURL URLWithString:someUrlString]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url]; NSString *msgLength = [NSString stringWithFormat:@"%d", [parameterString length]]; [theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"]; [theRequest setHT...

Possible to change the alpha value of certain pixels on iPhone?

Is it possible to change just a portion of a Sprite's alpha in response to user interaction? A good example of what I mean is iFog or iSteam, where the user can wipe "steam" off the iPhone's screen. Swapping images out wouldn't be feasible due to the sheer number of possibilities where the user could touch and move... For example, say ...

UIButton delayed state change

I have a UIButton subview inside of a UITableViewCell. When this button is touched, the user must hold the button for about a half second for the button's image to change to the UIControlStateHighlighted image. This means that if the user just taps the button as is usually the case, the highlighted state is never shown. Why does this ...

changing your company entity and tax ID number for your iphone app that is already approved.

Does anyone know if it is difficult to change your company entity and tax id for an iphone app that has been submitted and approved? ...

iPhone: detecting double taps on uiscrollview

Besides subclassing, is there a simple means to detect double taps on a UIImageView within a UIScrollView? Thanks John ...

iPhone - strange error when testing on simulator

Hi I was testing my app on the simulator when it crashed on clicking a button of a UIAlertView. I stopped debugging there, made some changes to the code and built the app again. Now when I run the application, I get this error in the console Couldn't register com.myApp.debug with the bootstrap server. Error: unknown error code. This ge...

disable/enable return key in UITextField?

Is there a way to programatically enable and disable return key on the UIKeyboard? The closest I could find is enablesReturnKeyAutomatically, but that only will tell whether to disable it at all. ...

UIPickerView - 1st row selection does not call didSelectRow

Hi I have a pickerview on my UIView along with a UITextField. I am letting the user select a value from the picker or enter a custom value in the text field. When the user selects any option from the picker, the variable values are changed fine (in the pickerView:didSelectRow:inComponent:) method. But if the user does not select any va...

RSA Encryption-Decryption in iphone

I am developing Iphone application. I have used SecKeyGeneratePair method of Security/Security.h framework. I am getting public & private keys as SecKeyRef objects. Can I access the key or print its value to console? Can I get NSString or NSData object from it ? When i print the key to console using NSLog I am getting . Can we pass these...