iphone

what is self? when should i use it?

can you explain me the self in the objective-C 2.0 ? when and where should i use? is it similar with this definition in java? ...

Show loading screen while parsing, then refresh UITableView?

I have a UITableView with the following code: - (void)viewDidLoad { [super viewDidLoad]; parser = [[XMLParser alloc] init]; [parser parseXML]; My problem is that the launch takes too long because it's parsing everything before displaying the view controller with the UITableView. Also, if I set up another UITableView and pa...

How to make the "hot area" of a UIControl bigger?

Or: How to expand the sensitive area for a UIControl without just making the view bigger? I have a pretty small button image (a little arrow), which is just 10 x 10 pixels. Too small for touching. I want the "hot area" to be 50 x 50 around that. For learning, I want to know how to do it manually, even if I could use some of the provided...

How can a covered UIControl or UIView still know about if a touch ended over it or not?

I have a UIControl (or UIView, could have either of them, doesnt matter), and this is covered by another UIControl. The other UIControl reacts nicely on touches. But the underlying UIControl also needs to know about the touch and if the touch was actually "on it" or not (from the user's perspective). The covering UIControl is partially t...

iPhone PHP integration

Hi to all, I want to make an iPhone application that send some data to php web site. Which is the best way to do it? Someone know how application like facebook do it? I can avoid to use SSL? Thanks! ...

NSString is cut off prematurely in a UITableViewCell in 3.0, but looks fine in 3.1

I am using UITableViewCellStyleValue2 and UITableViewStyleGrouped. Let's start with some code (it's not 100% complete, but I have tried to include the code needed to hopefully decipher what I am doing, and maybe doing wrong): #define CELL_FONTSIZE 15.0f CGSize textSizeValue2 = {207.0f, 9999.0f}; if ([value isEqual: CELL_4]) { CGS...

Open view with slide effect from bottom to top on iPhone

Hi all! I'm making an application for iPhone (which runs in landscape mode) (OS 3.0), and I want that when I touch a toolbar button it opens a view with a slide effect (similar to the effect when you touch 'Bookmarks' in Mobile Safari's toolbar) from the bottom to the top of the screen. The view is in the same XIB file as the button. H...

does using try catch block in xcode show error on real device?

my application is running fine in simulator...but not on real device....and i have jailbroken iphone so i am unable to debug through device...if i use try catch something like this @try { Statements } @catch (NSException *ex) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:[NSString stringWithFormat:@"%@",ex...

Parameter losing value when passed

Hey guys, I'm sure this is something simple but I've been staring at it for a bit now and I think all I need is a fresh pair of eyes to look at it, and since my cat doesn't have a whole lot of experience with iPhone programming I've turned to you. I am passing a variable of type float from a class (UIView) to another class (UIViewContr...

The document NSBundle.h could no be saved

I'm having some troubles with the bundle and somehow I can't save images from bundle to docs directory any more. Now I've got this error before building: The document NSBundle.h could no be saved It apparently compiles well. This is the kind of code I'm using: //Get every name from plist array and append it to the full path for(...

for- loop in background thread accesses each index more than once --- iPhone dev

I have a method getImageData which I call as [self performSelectorInBackground:@selector(getImagesData ) withObject:nil]; in my viewDidLoad. getImageData has a for-loop i realised that each index in the loop is called more than once. I also access a static NSMutableArray in the loop. When i don't retain the array it gives me exc bad acce...

Changing a UITableView's scroll insets programatically to reflect the size of an iPhone keyboard

I know you can use the "Inset" property in Interface Builder to make a scroll view be inset from the main window so that it doesn't go below existing controls on the screen such as a tab bar, but how can you do this programatically to adjust for when a keyboard is added to the screen? Currently my scroll view has cells under the keyboard...

UISearchbar changing UItableViewCells on type

I have to implement "Search bar & Search Display controller". On type elements should be filtered. Any sample code or reference links. I am trying myself also. I have stored my data in nsmutable array, which is required for tableView. Thanks in advance for helping me. ...

call action method for a uibutton without using interface builder in cocoa

I'm currently calling an action method in an object by dragging a button to the view in interface builder. I then drag an object to the panel and specify my object with the action method. I shift drag my button to the object and choose my action method. This works in calling my method. I would like to instead call my action method wi...

How can a UIControl pass all touch events on to the next object in the responder chain?

That's tricky. I have a small button over a very big one. When the small button on that big button is pressed, the small button does something. But the big one does nothing. Of course. But now I want that the big button also does something, no matter if the small button was tapped or not. So the small button has to forward all touch even...

iPhone Sandbox rules file

Where can I find the application sandbox rules file for 3.0 firmware? I remember seeing it somewhere around in 2.x, but now can't find it. ...

Recognizing patterns when drawing over the iPhone screen.

Hey. I'm trying to write a game where the user can issue commands by drawing certain patters with his fingers..for example, if he draws a circle, an 'S' letter, an expiral, ect. I'm already familiar with touch events and I'm capable of reading the coordinates... my problem Is in finding algorithms and information about the recognition ...

How to know which certificate has been used to code sign an iPhone build based on the app bundle alone?

I am building my app for adhoc distribution and appstore distribution. When I go into the Xcode code signing settings, there is only two listings in there: Developer:<...> and Distribution: <...> I know I have three certificates in the system, one for developer, one for adhoc and one for appstore distribution. How can I tell which cer...

What message do you get when you try to "build and go" an AppStore distribution release using an Adhoc certificate?

I know you are not able to "Build and Go" a build for Appstore distribution using the appropriate certificate since it's not tied to a particular device. What is the actual error message you get when you try to do that? When I tried to build and go my AppStore distribution, it will attempt to install it on the device and then gave this...

Weird dynamic linking problem on iPhone

The following code crashes in an Xcode created template project. int main(int argc, char *argv[]) { uint64_t t64 = 100000; double s = (double)t64; // Crash! ... The crash is accompanied with the following console output and occurs on a 2.2.1 device but not on 3.0.1 devices. It occurs both compiling for Thumb or ARM. dyld...