iphone

Cant display button on specific rows of UITableView properly for iPhone

Hi, I am trying to have a button for selected rows of my table. Here is the example code I am using: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *ControlRowIdentifier = @"ControlRowIdentifier"; UITableViewCell *cell = [tableView ...

Is it okay for multiple objects to retain the same object in Objective-C/Cocoa?

Say I have a tableview class that lists 100 Foo objects. It has: @property (nonatomic, retain) NSMutableArray* fooList; and I fill it up with Foos like: self.fooList = [NSMutableArray array]; while (something) { Foo* foo = [[Foo alloc] init]; [fooList addObject:foo]; [foo release]; } First question: because the NSMutableAr...

Where Does A UIAlertView Live While Not Dismissed

Does anyone know in whose subview an active UIAlertView is located or how to find the thread in which it is running? ...

Apples Core Data iPhone Recipes Example Question

Why does Apples Core Data iPhone Recipes Example use a separate entity for called Image linked to the Recipe Entity via a one to one Relationship to store the recipes image. Why not just have an "image" attribute in the Recipe Entity? Many Thanks ...

nsfetchedresultscontroller with empty sections

I have a database of People and pets, with a one to many relationship Person Pet Name Name Pet <----->> Owner I am using a UITableView backed by Core data and a nsfetchedresultscontroller to display the list of pets, grouped into sections by the owner. NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]...

iPhone OpenGL scrolling background jumps when texture is drawn for first time

I have been fighting a problem for a while now and would appreciate any help anybody could give. I have a sprite that moves within a landscape. The sprite remains in the center of the screen and the background moves to simulate that the sprite is moving within the landscape. I have split the landscape into sections so that I only draw t...

One iPhone, two developer machines

Hi all, I switch between my iMac and MacBook when working on my apps. I've always used my iMac to test the apps on the actual device, but I would like to be able to do this from both computers. I cannot seem to use the profile on my MacBook as it does not have the correct Certificate Signing Request in the KeyChain. Is there a way to co...

VFP Unit Matrix Multiply problem on the iPhone

Hi. I'm trying to write a Matrix3x3 multiply using the Vector Floating Point on the iPhone, however i'm encountering some problems. This is my first attempt at writing any ARM assembly, so it could be a faily simple solution that i'm not seeing. I've currently got a small application running using a maths library that i've written. I'm ...

SEL performSelector and arguments

Hello, It seems like there should be an easy way to call a selector with some arguments when all you have is a SEL object. I can't seem to find the correct syntax. -(MyClass*) init: (SEL)sel owner:(NSObject*) parent { int i =10; [parent performSelector:sel:i ]; } ...

Saving a project as an .ipa

Hello all! I wrote an app for the iPad, but I don't currently own an iPad. I would like to save my project as an .ipa file (assuming it's .ipa for the iPad, like the iPhone) so I could send it to a friend with a Jailbroken iPad to test it on an actual device before I release it to the App Store. Is there any way I can do this? Thanks ...

UIViewController as statemachine?

I want to have a general controller that acts as an abstract statemachine (not have any views/bars etc. of its own). Is the UINavigationController meant for this too? ...

How to check for custom url scheme on iphone?

Hey guys, I want to use custom url schemes in my app, for example calling navigons mobile navigator. First of all I want to check whether navigon is installed or at least whether the custom url scheme "navigon://" has already been registered. Any Ideas? Thanks a lot. ...

Copying contents from one NSMutableArray to another

I have two NSMutableArrays: NSMutableArray* currentMessages NSMutableArray* items I am trying to copy the contents of items into currentMessages as such: [self.currentMessages addObjectsFromArray:self.items]; When I am debugging self.items contains 30 objects. After this operation self.currentMessages contains 0 objects. Why is th...

Showing login view controller before main tab bar controller

I'm creating an iPad app with a tab bar controller that requires login. So on launch, I want to show a LoginViewController and if login is successful, then show the tab bar controller. This is how I implemented an initial test version (left out some typical header stuff, etc)... AppDelegate.h: @interface AppDelegate_Pad : NSObject ...

Keyboard problem on iPhone OS 4.0 (8A248c)

Hi! I have view with text field -- subclassed from UIAlertView. In the textFieldShouldReturn delegate I call resignFirstResponder for text field and dismissWithClickedButtonIndex for view. On the 3.x version everything fine, but on 4.0 keyboard still present on screen after view dismissing and doesn't disappear while app running. App com...

iphone SDK: how to add a new line char to my uitextview programmatically?

Please help me adding a line break (\r\n) programmatically to my uitextview ...

Event for finger being moved off button but not lifted in objective C (iphone)

Is there an event which will get whether the user has moved his finger outside of the button? Kind of like TouchUpOutside except without the "up" bit. Like how the iphone keyboard, the letter gets smaller (back to normal) as you move your finger of the letter. ...

Memory leak problem. iPhone SDK

Hello, i've got a problem, i cannot solve it, just recieving error: Program received signal: “0”. The Debugger has exited due to signal 10 (SIGBUS).The Debugger has exited due to signal 10 (SIGBUS). Here is some method, if i comment it out, problem goes aways - (void)loadTexture { const int num_tex = 10; glGenTextures(num_...

Iphone 3d games using Open Gl Es

Hi, I want to make 3d games for the iphone and with all this doubt about Unity and Apples new sdk agreement I'm wondering what the best way forward is? A lot of people recommend opengl es and point me in the direction of the open gl es bible and likewise, the problem is none of this actually talk about setting a game up i.e loading a c...

Add a smaller subView with new origin

I can't get my head around this - I know it must be simple.. I'm starting to feel pretty stupid. I have two viewControllers. MainViewController.h/m and LevelsViewController.h/m I want to add a subView from the LevelsViewController class and a view that is built in IB called levelsView. I am calling this from the MainViewController.m fil...