xcode

'Card' may not respond to '-fadeAway'

I have a Card class subclassed from UIView and a Deck class from NSObject. Card has a few integer properties on top of the inherited UIView ones and Deck has an NSMutableArray for holding some cards. After generating a deck of cards, I want to display a randomly selected card (by adding it to the superview). Before I do, I check to se...

generate single random number in a view in xcode

hi . i was playng around with an idea. in a single lable in a view when the view appears a random number is displayed. presently i have aview, a lable and a button. press button random number is generated and the lables title is replaced with a random number....random number displayed. what i wish to acheive is that there is no button,...

How can I make Info.plist show English names?

I have a project with two Info.plist files (one for each target). In the second Info.plist, when I add a field it shows the internal name instead of the English name. For example UISupportedInterfaceOrientations instead of "Supported Interface Orientations". Also, when I click on the dropdown list to see all options, some of the options...

OCMock for iPhone (iOS4, XCode 3.2.3)

I have the last version of OCMock (1.55) and XCode 3.2.3. I have created a test bundle target in my project. What is the best way to use OCMock in my tests? When I add OCMock.framework to the test bundle, this build error appears: "_OBJC_CLASS_$_OCMockObject", referenced from: objc-class-ref-to-OCMockObject in NotificationTests.o ...

Objective-c animation block doesn't seem to fire

I have a method in my UIView subclass "Card" to dismiss an instance by fading its alpha from 1 to 0. I do a similar thing when I add the card to the superview and it fades in fine. But when I call fadeAway, it just disappears immediately. The presentation code is in my controller class. Here is my Card.h and Card.m #import <UIKit/...

How To Parse the HTML webpage in Iphone OS 4.0

Hello all I am working On Iphone Os 4.0 ,in that I have some html webpages which changes dynamically . So could any one explain the way how the html file parsing in Iphone os 4.0 Thanks all ...

Popup UIPicker instead of keyboard

Hello, I want a UIPicker to popup instead of the keyboard when I click on a text field. Is this possible, I've been googling for awhile but can't find anything. Does anyone have any sample code ? Regards, Stephen ...

Can you pre-populate an iPhone Apps Caches or Document Directory with data in XCode?

I have an iPhone application that downloads images into the Caches directory on an as needed basis. However, I'd like to provide a portion of those images pre-cached. Is there a way through XCode to define a "Library/Caches" folder that will copy into the Library/Caches folder found in The Application home directory on the iPhone - so I ...

Static library dependency compiles in simulator on Xcode 3.2.3, fails on device

Upgrading to XCode 3.2.3 and iPhone 3.2/4.0 SDK has introduced a strange bug into my build process. I have a static library, Compton, which itself depends on three20. I build Compton as a dependency of the client apps that it powers. When I compile Compton as its own project in either simulator or device mode, 3.2 or 4.0 SDK, everythi...

Using objects in an NSArray

Hey I have these UIView objects in a dictionary I have created as such: - (NSArray *)createNumberOfViews:(NSInteger)number { NSMutableArray *viewArray = [NSMutableArray array]; for(NSInteger i = 0; i < number; i++) { UIView *view = [[UIView alloc] init]; // any setup you want to do would go here, e.g.: // view.backgroundColo...

unity to xcode orientation issue

I used Unity iPhone(1.7) to build an app and brought it into Xcode (3.2.3). When the game is built out, Unity creates an appController file automatically and in it, a window is created which displays the game. When I launch the game, I can clearly see when I rotate the device that the window is rotating as well. The game elements themsel...

iPad app UI design questions

The interface of my iPad app has multiple section boxes (looks similar to this stackoverflow page). I'm new to xcode and iOS programming but have years of web development experience. I would like to know what is the best way to design this. Should I put everything in one xib file? (section1headerlabel, section1text1,section1text2..) ...

UITableView with Custom cell

Hi Guys I have a UIView and on it i have place a tableview, the tableview uses custom cells fed data from an NSArray. Some strangeness going on in that at most I can only ever get the table to display 2 cells even though there are 10 cells there and all 10 are populated. I have a different nib arranged the same way and it works perfect...

How can I draw a line through a point or to a point, where the line is always the same length (iPhone app dev)

I have a circular graph with a radial cursor on it, and the cursor moves to where you touch on the iPhone screen, but I need the cursor to remain the same length, even if the touch occurs close to the origin of the graph or outside the graph. I have no idea how to do this. Any help would be greatly appreciated ...

Using Variable of AppDelegate as a Global Variable - question regarding release/retain

Hello, I have created a Variable called "myDBManager" in my AppDelegate: @interface myAppDelegate : NSObject <UIApplicationDelegate> { MyDBManager *myDBManager; } @property (nonatomic, retain) MyDBManager *myDBManager; @end which I use in most other classes as a global Variable holding all my critical application data. It gets o...

NSTask and NSPipe example to comunicate with the command line objective-c

Can someone show a quick example on how to use NSTask and NSPipe in conjunction to do this: Charlie AI - run through terminal to comunicate with the AI I want to create a nice GUI for it using xcode and objective c. I want to have 2 NSTextFields for the charlie's response and user input. Then have a send button to send the user input t...

XCode's Build and Analyze - mistake or correct in finding Potential Leaks?

How reliable is Xcode's "Build and Analyze" ? I keep looking for the "potential leak" that it finds - but don't understand it. Here the code: -(void)viewDidLoad{ self.navigationItem.leftBarButtonItem = self.editButtonItem; UIBarButtonItem *aBI = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd ...

difference between presentModalView and addSubview?

When revealing a new view, what are the differences between these two and when would you use each? Also, what's the right way to nest views. for example, I have a UIImageview that animates onto my view and it has a button on it. I want to put that image and the button in their own view, then simply animate the view and have both handled...

Where can I learn more on xcode OpenGL ?

Where can I learn more on xcode OpenGL ? ...

How to programmatically add text to a UIView

I have a UIView that I'd like to add several bits of text to. I have used a UITextView but I think that's overkill as it doesn't need to be editable. I thought about using a UILabel or a UITextField, but I don't see how you tell the superview where to position the UILabel or UITextField within itself. I want the lowest footprint objec...