objective-c

Core Data - Relationships

I have three core data entities which I am importing into, they are: • sizes (Name, Clothes (one to many with "Clothes" entity)) • Clothes (Name, Price, etc... +2 relationships) • shop (Name, Clothes (one to many to "Clothes" entity)) I have imported shops, into shop and sizes into the sizes entity. Now I am importing the clothes. ...

XCode Project Libraries and Version Control

Hello folks, I've just discovered, via the Objective Flickr API, that you can add projects into xcode as secondary libraries for your own project. It's very nifty, and it's finally let me get on top of the Flickr stuff I wanted to do. Problemo! I need to bung this stuff into version control. Presumably the .proj file is what keeps a re...

how to diplay message that no result found in uitableview. Iphone.

Hi. I am sending argument in xml feed from search bar to php page. now what i want to do is to display no result found in table view if no match found against that argument.... Can any body tell how to do. that.... ...

creating instances in objective c

Here is my code: //ECHOAppDelegate.m @implementation ECHOAppDelegate ... @end //PtyView.m @interface PtyView (PtyPrivate) -(void)startTask; -(void) didRead: (NSNotification *)fileNoty; @end @implementation PtyView ... -(void)startTask { //starts task } @end Now, how do I trigger "startTask" from ECHOAppDelegate.m? I need...

How to find out the modulus and exponent of RSA Public Key on iPhone/Objective C

Hi there! Is there a possible way to find out the modulus and exponent of the Public Key, created with SecKeyGeneratePair (the Security Framework in general)? ...

Dismiss UI action sheet - crash

Hi guys, I have a "again" ;-) a problem i can't solve. My app launches on a tableView. When i select a cell, i go to the "detailView". On this view i add two buttons on the toolbar this way : UIToolbar* tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 115, 44.01)]; // tab where buttons are stored NSMutableArray* buttons = ...

CALayer memory usage on draw - implicit cache?

Hello everyone. I'm having a peculiar problem with CoreGraphics/CoreAnimation on the iPhone. To better explain how the problem manifests itself, I'll walk you through my current setup and illustrate with code where appropriate. I'm trying to draw a bunch of preloaded images in a UIView's CALayer, but whenever the image displays, the ap...

UITextField make text bold?

Quick question, does anyone know how to programatically make the text in the textField bold or italic? @property(nonatomic, retain) IBOutlet UITextField *textField_TOP_01; [textField_TOP_01 setTextColor:[UIColor redColor]]; [textField_TOP_01 setText:@"This text is bold"]; Much appreciated Gary ...

How to use a boolean in NSUserDefaults

When the root view controller of my application is loaded, I want to be able to check whether or not the users login credentials have been saved to NSUserDefaults. Basically, when the user loads the application and he/she doesn't have her login credentials saved, a modalAlertView will be pushed and the user will be able to save their cr...

Objective-C return enum array from method

I have an enum in my objective-C code similar to this: typedef enum { FRUIT_APPLE = 1, FRUIT_PEAR = 2, FRUIT_BANANA = 3, // etc. } Fruit I need to be able to return an array of these in a method, something like this: @implementation FruitTest static Fruit fruits[] = {FRUIT_APPLE, FRUIT_BANANA}; +(Fruit[]) fruits { ...

Return error in NSMutableArray

I'm trying to to return a NSMutableArray but I got this error in the console: 2010-10-01 14:12:21.348 Phonebook[1424:a0f] +[LinkedList getListArray]: unrecognized selector sent to class 0x1000053e8 The method code is: - (id)getListArray { ListNode *tmp = iterator; iterator = head; NSMutableArray * list = [NSMutableArray...

beginAnimations:context: not working with color?

I am a little puzzled why the following is not working, button_ONE does a nice fade, but pressing button_TWO just snaps the color to black with no fade. // FADES OUT OVER 1.5 Secs - (IBAction)button_ONE:(id)sender { NSLog(@"FADE ALPHA"); [textField_TOP_01 setAlpha:1.0]; [UIView beginAnimations:nil context:nil]; [UIView s...

Why is my UIView category causing warnings?

I added a category to UIView to hold some transition helper methods. The methods are all working; however, I get compiler warnings: warning: 'UIButton' may not respond to '-fadeOutWithDuration:' My "UIView+Trans.h" file looks like this: @interface UIImage (trans) - (void) fadeOutWithDuration:(CGFloat)duration; @end My "UIView+T...

Globally monitoring NSMouseMoved returns NSMouseUp

I'm trying to register the NSMouseMoved event globally using this line of code: [NSEvent addGlobalMonitorForEventsMatchingMask:NSMouseMoved handler:mouseMovedBlock]; However, my mouseMovedBlock only gets called when the mouse gets clicked and not when the mouse is moved. I tried detecting the type of the NSEvent and it returns NSMouse...

Objective-c class extensions not effectives in static library

Hello, while creating a library that will be used on several projects, I encountered an error that I was not able to resolve by myself. The library is composed of several "modules" that each declares its set of classes. The modules declares a header file that references the classes. Each module header is included in the library header,...

iPone CoreLocation framework not working on XCode SDK 3.2.4 with Simulator 4.1 and XCode SDK 3.2.3 with Simulator 4.0.X and iTouch device with OS 4.1

Hi All, Facing serious problem. Implementing CLLocationMangerDelegate and using - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation but method - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error{ NSLog(@"%@"...

Synthesize property errors when compiling iPhone app.

I am following the tutotial on Apple's website for building your first iPhone application, as this is a field i would like to be involved in. I completed the app, but then decided to merge it with another app. (One simply changes an image when tapped, one displays text from a text box when a button is tapped, so not too tricky to combi...

Drag UIView between UIViews.

I have a UIView object X that is contained in an UIView object A. I want to be able to touch X and remove it from object A and move it into object B (another UIView). Both Object A & B are inside of the same super UIView. A B _____ _____ | | | | | X | -> | | |___| |___| This is what I have so far. @implementat...

UIApplication OpenUrl double-escaping my URLs

Basically, i'm trying to program a "tweet this" button from inside my application. Depending on their spot in the application, they can click the tweet button and it'll shoot them out to Safari with a tweet message that changes depending on where they are. In order to create URLs, I have to escape the query string that I want to put in...

Differences Between Cocoa and iPhone development

I'm currently reading Aaron Hillegass' book "Cocoa Programming for Mac OS X" as it is highly recommended throughout the community. I'm wondering if there's an extreme difference between "Cocoa Programming" and iPhone development. I'm more interested in iPhone development, but I figured iPhone development would be easier to pick up if I w...