iphone

How to set background color for UIWebView in iPhone sdk

I have added the back ground color as an image to uiwebview but it is coming to the back side of web view not to the web view. The web view is always in white colored view, I can't change it. myView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; myView.autoresizingMask=YES; webView = [[UIWebView alloc] init]...

EXC_BAD_ACCESS while creating a simple UIAlertView

While declaring a simple UIAlertView, with the following code, I get the above mentionned error on that line: UIAlertView * alerteken = [[UIAlertView alloc] initWithTitle:@"Email" message:@"Please enter the @mailinator.com email address you want to read:" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok"]; What am I d...

Touch debouncing on iPod/iPad

Is it common practice to do some kind of debouncing / refractory period for handling user touches? I have a view based app with quite a few UI objects that are currently using touchUpInside to flip states. I notice that its almost easy to double touch or cycle the state more than once. Since the gameplay is relatively fast it doesn't ...

Apple's UIKit experience versus .net experience

I am new to iPhone programming. Coming from a .net background, I find Apple's UIKit really difficult to use. For example, creating a simple static table view requires me to implement a lot of datasource and delegate methods. In .net, you just add the items and set their properties in Visual Studio, that's it! As my application is getting...

Core data, managed objects and multiple table view controllers

I have a UITabBarController with two tabs.  Each tab has a UINavigationController and each nav controller has a table view.  The first tab lets you see and edit a list of all employees.  The second tab lets you see a subset of the employees.   My problem is that in the first tab you can delete an employee from core data.  However, when y...

core data with pre populated sqlite from csv!!

Hi all, Ive been struggling with this for a couple of days now and after scouring the internet I still havent got it working. I have a csv file, from which I need to populate an sqlite db to use with core data. I thought I had found a solution here http://ablogontech.wordpress.com/2009/07/13/using-a-pre-populated-sqlite-database-with-c...

Android Toast in iPhone.

I have made Android application a few months ago. The Toast class is very useful for me. I do not need to consider the main Thread and place to show it. Anywhere I can show it and just leave that and it is automatically disappeared. Toast.makeTest(context, msg, Toast.LENGTH_SHORT).show(); That's it. ^^ What about iPhone? Is there s...

iPhone storekit sandbox stopped working.

Bug reported as fixed by Apple, see accepted answer below ... UPDATE MON AUG 23rd 10:00 GMT Although the bug report with apple hasn't been closed yet, it now seems to be working (at least for a couple of us) OK. It could be they have nailed it, or the fix is in testing, and I'll report back when (if) I hear anything more from Apple. ...

Are there apps that let you code ON the iPhone (not FOR the iphone)?

I'm just wondering if anybody knows of any simple IDEs or interpreters or anything that lets you play around with code on your iPhone. ...

How to get the iPhone view's current orientation or the device's last orientation?

In my app an image appears when user shakes the device. There are different images for landscape and portrait mode. If the iPhone's orientation is portrait or landscape, it works fine. But if it is UIDeviceOrientationFaceDown or UIDeviceOrientationFaceUp, the image should depend on the last orientation used, because the view is still dis...

iPad/iPhone interesting memory observation

I have a quite a big iPad app and when I run the app in xcode debug mode, it shows about 50 MB in the Activity Monitor and memory grows slowly. (About 0.1 MB per 30 seconds approximately.) But when I run the app directly from the simulator(which is already installed in the simulator) , it shows about 10 MB in the activity monitor and mem...

problem in searching table views

Hi, I am facing a problem in implementing the search functionality in Table Views... Here is the code i am implementing to search... - (void) searchTableView { NSString *searchText = searchBar.text; NSMutableArray *searchArray = [[NSMutableArray alloc] init]; searchArray = [data boats]; for(Boat *boat in searchArray) { NSRange t...

Can I draw on an existing CGImage directly?

I want to draw on an existing image to achieve the accumulation effect. Currently, the only way I found is: UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGetCurrentContext(); ... // draw the existing image // draw other things ... UIImage *color = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImage...

dragging objects on the specified path in iphone skd

I defined specified CGPathRef, and i am trying to dragging some objects on this path. I tried several tricks, but couldn't make the required dragging. ...

creating a reference for use in identifiying if a button was clicked

How is it possible create a reference for an uibutton to check if it was pressed and do something like make the value for that button true in order to be able to use that value later on. I heard of ivars but i havent seen any documentation on how to use them and im not sure if they would work for my ibaction uibutton... ...

IPhone watchdog & malloc

Hi! My app is using quite a bit of memory and therefore it's often get killed by the watchdog. In my efforts to reduce memory consumptions (and change some other stuff too) I've rewritten some of the system functions (replaced few CoreText classes to be exact). That actually went pretty well and I've managed to reduce memory consumpt...

Hiding an NSArray - how do I do it?

I've got an NSArray setup in my code to display two PNG's alternately flashing, I'm trying to setup a piece of code that sets it to a hidden status, moves it off screen, anything to get it out of sight of the user. The code for my array is NSArray *imageArray = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"CONNECTED dark ye...

Assign to my UIButton what the editButtonItem from the NavigationBar does

Hello I have a TableView on my View. I somehow do not have a Navigation bar. I only have UIButtons and I want one of my buttons to do exactly what the editButtonItem. How must I proceed to do that? ...

pthread_mutex_destroy blocks in infinite loop

Hello, I use POSIX threads on iPhone/iPad and when I try to destroy a mutex, pthread_mutex_destroy blocks in infinite loop. I did not find anything about this. It should return an error code... Do you know something about this? Thanks! ...

Does it matter when super is called in dealloc?

- (void)dealloc { [super dealloc]; [receivedData release]; receivedData = nil; } or - (void)dealloc { [receivedData release]; receivedData = nil; [super dealloc]; } ...