iphone

UIScrollView seems to use a lot of memory on big ContentSizes

I have created a UIScrollView (canvas.scrollview) and have a custom UIView (canvas) inside it. A normal configuration for starting up is something like this: CGRect cs2 = CGRectMake(0, 0, 4000, 4000); CGPoint screen = {[UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height}; self.canvas.frame = cs2; //canv...

core data exception from deleting dummy row that was never in core data

I have a UITableView tied to core data. When there are no entries, I hack the table to make sure that #sections = 1, #rows = 1, and that this row displays text that says "your table is empty; add a new item using the + button". When the user adds his first item by clicking the + button, though, core data throws an exception saying that...

Error trying to get iAds off screen

Trying to make iAds go off screen when no ad is loaded, as per Apple's request. They gave me this code: - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error { if (self.bannerIsVisible) { [UIView beginAnimations:@"animateAdBannerOff" context:NULL]; // assumes the banner view is at the top of the s...

How do I get a subView to completely cover the screen?

Here's my first view: When I call [self.view addSubview:theSubviewController.view]; I get this: See how it does not completely cover the first view? The UI controls respond to clicks on the left half of the screen where the view background is, but they do not on the right side of the screen. In the view controller, I have enabled s...

iPhone SDK: Interact with Images

Hi everyone, I was making an app for the iPhone and part of what I want to do is that whenever the user touches a certain spot (let's say a circle), the app should react and do something. How do I pinpoint that one spot as a button? Or is there a different way to do this? I have a UIScrollView with a subview of a UIImageView. Thanks i...

EXC_BAD_ACCESS Error for no conceivable reason.

OK, This is a method from my program that keeps giving the EXC_BAD_ACCESS error and crashing. I indicated the line below. questionsShown is a readwrite property and points to an NSMutableArray that I initialize with a capacity of 99 at an earlier point in the program. When I debug everything appears normal in terms of the property being ...

How do I change the Color of the Back Button in the Navigation Bar?

Hi, How do I change the color of the back button in iPhone? I have already tried something like this, but it does not work: UIView *customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 49.0, 30.0)]; customView.backgroundColor=[UIColor blueColor]; UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithCustomView:customV...

How can I automatically click cancel when an OK-Cancel alert pops up in the UIWebView?

I'm having a problem with my UIWebView for my iPhone App... I am getting an alert thrown up with OK-Cancel button options, and I don't want the user to see this... But the web page automatically pops up an alert. How can I programmatically detect the Alert was thrown up and how do I click the cancel button on the alert? Thanks, Matt ...

Dismissing multiple modal views

My application presents a modal view (A) from the main view that lets the user make a selection. When they make that selection it opens a second modal view (B) on top of the first one (A). When I'm done with the second modal view (B), and want to dismiss it, I would like to dismiss the first one (A) and the second one (B) at the same ti...

CFPreferencesCopyAppValue not working under iOS 4

I am storing a username in CFPreferencesCopyAppValue. Under iOS 3.1.3 it works as expected but in iOS4 it stores it while the App is open but as soon as its closed (using the multitasking close ability) the variable isn't stored, ie on relaunch of the App its null. I have a feeling it might be an issue with the multitasking as the App i...

MBProgressHUD causes application to crash

It seems that using MBProgressHUD is causing my application to crash. Without the HUD code, the following runs just fine, but with it, it crashes: { ... HUD = [[MBProgressHUD alloc] initWithView:self.view]; // Add HUD to screen [self.view addSubview:HUD]; // Register for HUD callbacks so we can remove it from the...

How to asynchronously receive data into a Rails app from an iPhone app?

Hello everyone, A large part of a project I'm working on now deals with sending certain messages, which can easily and preferably be XML, from an iPhone app to a Ruby On Rails app. The webapp will have to instantly show these messages, so reloading the page isn't really an option. I've been unable to find any info re: creating this sor...

Animating changing values of CGContextFillRect

Is it possible to smoothly animate a changed width property of CGContextFillRect over say 5 seconds? CGContextFillRect(context, CGRectMake(x, y, width, height)); I'm trying to write a method for an iphone app that basically takes a time value and animates the change of CGContextFillRect width from the initial value to the final value ...

What does the "Power Logging" setting in iOS4 do

I noticed a new setting screeen on the iPhone since iOS4: Settings -> Developer (just below iPod, Photos, Store) -> Power -> Logging. Does anyone know what this does? I could not find anything about it in the documentation or on the net. ...

Create NSDate from Date: Today and hour: 5 min:0

How to create an NSDate Object with Date: Today. Hour: 5, Min: 0, Sec: 0 i.e. Date Object will have 07/02/2010 5:00:00 ...

How to get the current playback time from moviePlayer?

As i know moviePlayer.duration can get the duration of a movie, i know playableDuration, initialPlaybackTime,endPlaybackTime, but i want to get the current playback time of the moviePlayer .And if there has this method,which Notification should be sent to where,thank you! ...

UIDatePicker is crashing on value changed.

I have created a method and connected it with value changed event of UIDatePicker, but as soon as I changed the value the app. crashes. If I remove the connection of UIDatePicker's value changed to my method in Interface builder, then app does not crash. Can I not connect value change to my own method for UIDatePicker? ...

Issue when iphone takes place the Landscape Orientation

Hi all, I am using the delegate method for auto rotation in iphone application. -(BOOL)shouldAutorotateToInterfaceOrientation:UIInterfaceOrientation)interfaceOrientation{ if(interfaceOrientation == UIInterfaceOrientationPortrait ){ [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimat...

iphone - upgrading an application... what happens to customers?

I have an application that supports iOS 2.x. I am about to revamp this app, but I need to make it at least 3.x. What will happen to old customers? I mean, suppose a guy is using an old 2.x device and I release a 3.x app. Will this guy receive an alert on his iphone that a update is available? I know that iTunes is blind and allows one...

iphone - Xcode 3.2.3 error regarding deployment target

I have an application that is supporting iOS 2.0. The Base SDK is set to iPhone Device 4 and the iPhone OS Deployment Target is set to iPhone OS 2.0 My intention is to build it compatible with iPhone 3/3GS and 4 and iPod touch 2nd generation This settings I have compile file, but when I upload it to iTunes Connect I see this error T...