iphone

Inheritance Issues in Objective C

I created an "SDMutableGrid" class so that I could use a grid. It's just a child of NSMutableArray that contains a number for arrays equal to the number of rows in the grid. Currently, the program quits before it really starts and it appears that it is because the methods defined for NSMutableArray somehow do not apply to SDMutableGrid...

Protocols with optional properties?

The short version is that I have a protocol which has an optional parameter. When I build a class that implements it with the iPhone SDK 3.x it compiles just fine, with no errors or warnings. When I used the 2.x SDK I get the following warning: Class.m:68: warning: property 'field' requires method '-field' to be defined - use @synthesiz...

iPhone: previewing photos

Hi, I am creating a photo preview application - it has some photos in it. When I had not a big amount of images, everything was fine. The app uses UIScrollView to switch between images, basing on the PageControl code example. But now I added more pictures and I have some trouble with it - it consumes too much memory and my app starts g...

Tiled backgrounds on iPhone using OpenGL ES

Hi, I want to make a 2D tiled background system on the iPhone. Something that takes a tilemap and tileset image(s) and converts it into the full map on the screen. Just doing some messing around, my first approach was to create a polygon for each tile. This worked fine until I started testing it for 400 polygons or so, then it starte...

How to implement ease BounceOut (Elastic) functionality in iPhone.

Hello all, I want to implement a bounce out easing function in my application. Something similar to elastic out. Like as in the following link http://www.powerping.be/js/jstween/moveSquare.html I want to implement something like that. ...

UIImagePickerView Controller - image path - iphone

UIImagePickerView Controller returns NSData of image, My requirement is to store the path of an image as a varchar data type. After selecting an image from UIImagePickerView, how can I obtain the complete path of the selected image of Photo Gallery of iPhone? My application won't have to worry about storing images within my applicatio...

How to get background image from UITableViewStyleGrouped for any UIView?

Hi, I would like to have a UIView with the same background as a UITableView with the UITableViewStyleGrouped style (its that grey-white pattern seen in the Settings App, for example). Is this possible? Thanks in advance MrMage ...

IPhone SDK: Adding a UIActivityIndicatorView to a UITableViewCell

Why doesn't the cell show anything in this code: UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; [cell.imageView addSubview:spinner]; [spinner startAnimating]; cell.textLabel.text=@"Carregando..."; [spinner release]; I'm doing this inside tableView:c...

How to save an image that is returned by UIImagePickerView Controller

I have an application, in which the user will select an image from a UIImagePickerView. After selecting an image from it, I want to save it in my application. How can this be achieved? Thanks in advance for helping me. ...

iPhone Dev - UIView frame and loadView

I'm learning to develop for iPhone (programmatically, I don't like IB). I only use IB for the frames of things, so I design in IB but only use it to check each control's frame. Something I've gotten very confused about is the frame of a UIView. First of all, if you do not implement loadView in a view controller, it automatically creates ...

objective-c static library class category, override method not working

I am using Three20 for the iphone and I am trying to change what a method does within it by using a class category. It compiles fine, but I never reach the break point in it. I'm assuming a class category affects all instances of the class, so I don't have to recompile the static library for it to work. I also know that the class I'm u...

No vertical scroll in uiscrollview w/ uiimageview subviews

I have uiimageviews as subviews for uiscrollview. I made my uiviewcontroller resize the scrollview contentsize and offset similar to how it was done here: http://github.com/andreyvit/ScrollingMadness/tree/master. The only difference is that I don't want my image views to take up the whole screen but try to stretch proportionally so I u...

Selecting a UITableViewCell in Edit mode

If I create a UITableViewController - drilling down works as expected. If a user selects a cell and I implement 'didSelectRowAtIndexPath', the cell flashes blue and the next view shows up. But, if I include an 'edit' button (self.navigationItem.rightBarButtonItem = self.editButtonItem), when the user clicks 'Edit' - the mode correctly c...

Code Sign Error When Building iPhone Application

I am new to iPhone development. I just registered with Apple for the iPhone Developer Program. When I try to build, I am receiving an error: Code Sign error: a valid provisioning profile matching the application’s identifier could not be found I'm not sure what is wrong. I tried browsing the Internet but I get confused. Can anyone ...

UISearchBar tinted like Contacts

The UISearchBar in my UITableView header is the strong color. The TableSearch uses the more subtle code, but I'm not sure how it's doing it. I've looked at the TableSearch example code. Specifically, I don't see tintColor being used anywhere in this example. I don't see opacity or alpha used, either. How does the TableSearch example do...

Programmatically getting the iPhone's carrier signal strength

Hi all, Is there a way to get the iPhone's carrier, and/or the current signal strength, using Objective-C? I know how to determine if a data connection is present, and whether or not that connection is wi-fi vs. cellular. I also know that you can manually place the iPhone into "field test" mode by going to the phone app, and dialing #...

moving an object without actually touching the object

Hey guys, I'm a beginner when it comes to iPhone development and i've searched for the answer to this question and haven't found anything yet. What i'm trying to do is allow the user to move an object without actually touching the object (they can touch anywhere on the screen) and as they move the object will go from where it was origi...

convert Int to bytes(NSString)

How do i convert integer to bytes string (NSString of bytes) , I used the below code char barr[4]; barr[0] = (unsigned int) (num & 0xff); barr[1] = (unsigned int) ((num >>8) & 0xff); barr[2] = (unsigned int) ((num>>16) & 0xff); barr[3] = (unsigned int) (num >>24); NSString *str = [NSString stringwithformat:@"%x",barr]; but i am ge...

How to determine where this memory leak is coming from?

How can I determine where this memory leak is coming from in my code? It doesn't reference anything but the "main" function in my application. ...

MKMapView Current Location Display

I am Getting the pin which Display Current Location in english but i want to display in Different language so how can i do this? ...