iphone-sdk-3.0

How can I detect if an iPhone OS device has a proximity sensor?

The docs related to proximity sensing state that if the proximity sensing APIs are used on a device without a proximity sensor (i.e. iPod touch, iPad) they will just return as if the proximity sensor has fired. Aside from checking the [[UIDevice currentDevice].model] string and parsing for "iPhone", "iPod touch", or "iPad" is there a sl...

Infinite loop when adding CATiledLayer to UIView

I have a UIView in which I add a CATiledLayer and implement 'drawLayer'. If I use a UIViewController and add the layer to a new subview of the controller, then everything is ok. If I however try to use a UIView to and do all the craetion and drawing within this, then I get a infinite loop at the point shown below when I add this view to...

how to hide the keyboard programatically in iphone

hi, How to hide the keyboard programatically in iphone ? ...

Passing touch events on to subviews

I have a view within a UIScrollView that loads an additional subview when the user presses a certain area. When this additional subview is visible, I want all touch events to be handled by this - and not by the scrollview. It seems like the first couple events are being handled by the subview, but then touchesCancelled is called and the...

iphone - generic question about objects

I have several UIImagesView and I put them on a MutableArray. The MutableArray is retained. I add them also as a subview of a view. After adding each UIImageViews on a view I release them... for example... [myView addSubview:myImageView]; [myImageView release]; If I am not wrong, each imageView has now a retainCount of 2, because the...

UIButton on UIScrollView can't work

Hi, i used UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 180, 180)]; myLabel.backgroundColor = [UIColor greenColor]; [self.view addSubview:myLabel]; UIButton *myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [self addTarget:self action:@selector(show) forControlEvents:UIControlEventTouch...

wait_fences: failed to receive reply: 10004003 - what?!

Hey Guys Been getting this odd error. heres the deal - in the below method i have an alert view come up, take a U/N and PW, then atempt to start another method. The method -postTweet does not get activated I just get this error in console wait_fences: failed to receive reply: 10004003 Which is really odd - as ive never se...

UIScrollView problem on iPhone and iPad

Hello guys! I am adding 6 subview to my uiscrollview. Then I scroll it and there appears 2 more views. These two views are UIImageViews. What do you think? What are they appear there??? That's very strange. ...

The graphical elements of UIKit – what format are they?

For standard interface elements of the Apple's UIKit, how do apple store them? Are they stored as cocca touch code, pdf, images or other? Thanks Ross ...

iphone - mutableArray cannot store nil objects

I have a mutable array that is retained and storing several objects. At some point, one object may become nil. When this happens the app will crash, because arrays cannot have nil objects. Imagine something like [object1, object2, object3, nil]; then, object2 = nil [object1, nil, object3, nil]; that is not possible because nil is the...

iphone - testing if an object exists

I have several objects in my app that can become nil at some point and I have methods that in theory are used to put these objects to nil. But, if I try to put to nil an object that does not exist, the app will crash. for example... [object1 release]; object1 = nil; //... and after that [object1 removeFromSuperview]; // this will c...

Can I access local images from an iframe inside of a uiwebview?

Basically Im attempting to take a php / jquery / css / html web app that is hosted remotely, and embed it in an iframe inside of a uiwebview in objective c using the big5 framework. I have my iframe set up and the web app is coming in correctly. My issue now is that I need to improve loading and performance. The easiest way to do this I ...

UITableView gives empty table, does not load data (solved)

Hi, Everything works fine when the view that holds my table is the main (first) view. However, when it's not the first view and I switch into that view, my table does not load data and I get an empty table. Using NSLog I can tell that the program is not invoking numberOfRowsInSection and cellForRowAtIndexPath. I have <UITableViewData...

Multiple NSOperationQueues?

Hello! I would like to use NSOperations in my application to resolve threading problems. I have read some tutorials and now I know what I have to do, but I have a problem. There is a must to have the same NSOperationQueue in each class. What if I use a new NSOperationQueue in each class. There will be concurrency problems? ...

How do I use UIImagePickerController just to display the camera and not take a picture?

Hello All: I'd like to know how to open the camera inside of a pre-defined frame (not the entire screen). When the view loads, I have a box, and inside it, I want to display what the camera sees. I don't want to snap a picture, just basically use the camera as a viewfinder. I have searched this site and have not yet found what I'm looki...

Custom Alert view

hi, I want to create a custom alert view, i.e. i want to put some images and my choice color on alert view, i know how to create normal alert view, but can any one help me out in this one??? so that the application will look pretty good. regard viral. ...

Will pool the connection help threading in sqlite (and how)?

I currently use a singleton to acces my database (see related question) but now when try to add some background processing everything fall apart. I read the sqlite docs and found that sqlite could work thread-safe, but each thread must have their own db connection. I try using egodatabase that promise a sqlite wrapper with thread safety ...

Changing custom cell appearance when entering editing mode

Hi, I have a table with custom cells, that I built in IB. When entering editing mode, content of all cells is moved to show delete edit control. My question is where can I adjust the cell appearance before entering editing mode? I saw that willBeginEditingRowAtIndexPath function is supposed to let adjust the UI, but seems I don't get th...

custom uitableviewcell for login input - username & password

Hi All, I want to create a simple table view with one section and two rows - one for username and another for password, similar to Skype login (screenshot here: http://i33.photobucket.com/albums/d74/chaks_2k/IMG_0143.png) Just two rows, one for username and another for password. Is there any out of the box cell style i can use for thi...

How to tell a rightCalloutAccessoryView has been touched for MapKit

I have a MKAnnotationView being allocated with a DetailDisclosure button being displayed on the right side of the annotation. How would I go about knowing when a user clicked on the annotation button? This is what my code looks like right now - UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; pinView.right...