Is there a way where I can only allow my app viewable in landscape mode? I've managed to default the application's orientation to landscape, however in the iPad simulator, when I do Command->Arrow, the application rotates to portrait. I've removed the listings in the plist under "Supported interface orientations" for both of the Portrait...
Hey all, this should be a simple task but for some reason i am making it harder... I am trying to save some text from an XML file to a NSString. But when i debug it, the string says "Out of scope".
Here is my code:
in my .h file:
@interface RootViewController : UIViewController<MBProgressHUDDelegate> {
NSString *thePW;
}
a...
Is it possible to build an xcode project for iPhone and have it install the result on a connected device without actually running the application? I'm currently using Build & Run, but I'm debugging a peer to peer game, so I have to build & run for two different devices, stop tasks on each of those and then build & run on the simulator so...
I need to have a loop that can constantly check for this variable:
NSString *charlieSoundVolume;
charlieSoundVolume = [charlieSoundLevel stringValue];
This variable will change by an interface builder patch. I was thinking of doing this:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
while(1) {
float fl...
I am building an iphone game. I have a set of NSStrings that I set periodically throughout the game life cycle. I am finding that I am in need of setting the same NSStrings often and looping through an array of NSStrings is ok for checking the value of the NSStrings atIndex:i, but setting them using the same method results in nothing. Ba...
I'm using an OpenGL Texture2D class and initWithString method to display strings to the user. When running with iOS 3.0 and XCode 3.1.3 all the text would appear black in the simulator and white on the phone. After updating to iOS 4.0, XCode 3.2.3, and iPhone SDK 4.0 the text appears black on the phone! Not so good since my app is alm...
Hi
I'm currently doing this to add a button to my navigation bar to call the SwitchViews method.
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back to App"
style:UIBarButtonItemStyleBordered
...
Hi,
i´ve searched the xcode doku but didn´t found anything about logging the datatype of a variable. How can i trace the typeof ?
Thanks
...
Hi,
I want to create an UIImageView with, for example, "Trend.jgp" for a special case (if-condition). I Tried various ways with CGRectMake but i'm not able to create this picture dynamically to a special place. Furthermore, i can't use the function setimage like it's described in the Developer Documentation.
Has anyone got an idea how ...
When I build app with Xcode 3.2.3 (iPhone SDK 4), following image was showed in Build Log
Info.plist: MinimumOSVersion value is
invalid. It must be a valid version:
(-19024)
...
Is there a way to replace the output console in xcode or alternatively do highlighting/filtering?
...
i have 2 classes.
class1 gets some information through the net. when one of these informations comes, class1 has to send a notification to class2.
i understood it so that i have to put
[[NSNotificationCenter defaultCenter] postNotificationName:at"anyUserNotification" object:class2];
into class1
[[NSNotificationCenter defaultCente...
I've trying to create a stopwatch with HH:MM:SS, code is as follows:
-(IBAction)startTimerButton;
{
myTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(showActivity) userInfo:nil repeats:YES];
}
-(IBAction)stopTimerButton;
{
[myTimer invalidate];
myTimer = nil;
}
-(void)showActivity;
{
...
I am working on a project that includes a Mac application and an iPad application that share code. How can I use conditional compile switches to exclude Mac-specific code from the iPhone project and vice-versa? I've noticed that TARGET_OS_IPHONE and TARGET_OS_MAC are both 1, and so they are both always true. Is there another switch I ...
I Want to Draw the custom shape or line for the select the cropping border of the image.
Please any one has idea for cropping image help me ?
...
I have a basic view with a UITextField and a Tableview. I am able to enter text to the TextView and capture the value through an IBOutlet and IBAction.
My IBAction is setMyNote within which I call the cellForRow... method.
In my cellForRow.. method I have this snippet code
static NSString *CellIdentifier = @"Cell";
UITableViewCell *c...
Hey, I am making a custom table cell right now but my custom cell is just white cell with some buttons and labels in background color which looks not that great.
Is there a way to render the background color so that the cell has some vertical gradient effect?
For example, on top of the cell it looks white and as it gets closer to center ...
Just starting to poke around iPhone development. I am trying to add an external project/library to mine (specifically the ASIHTTPRequest, http://allseeing-i.com/ASIHTTPRequest/).
I am at a bit of a loss as to how I go about actually adding this dependency to my project. I come from a Visual Studio/C# world, and in Visual Studio I kn...
Hi Folks!
I have an NSTextView that I need to insert a line break in. The code looks like this:
NSString *myString = @"test"
[myTextView insertText:myString];
/**** INSERT LINE BREAK HERE ****/
[[myTextView textStorage] insertAttributedString:MY_ATTRIBUTED_STRING atIndex:myString.length];
Anybody have any idea how to do this?
...
I have an attribute "term" which is a NSString in my core data "Event".
When the table view is loaded I want all the values of "name" to be loaded to an array.
I used the code
- (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath {
Event *event = nil;
event = [fetchedResultsController objectA...