I want my view controller to display different views based on a condition that depends on some runtime checks (lets say a uiwebview at even hours and a form on odd hours).
What is the best pattern to achieve it in iphone project? Maybe I can hide controls based on aforementioned condition or maybe it is better to load different views?
or...
Hi,
I apply impulse in an object in box2d iPhone app and now want to increase its speed in particuler direction....i mean i need two thing
1.through the object in a direction
2.increase speed
plz help..
...
Hello,
There's probably something really obvious I'm missing, but no matter how I trawl the documentation & the blogs, I can't find a way to make a button report whether or not it is being touched, regardless of whether the touch moves, etc. I have an up & down button, & I need to call the relevant method whenever there is a finger on ...
I've been using that kind of methods on and off but never really understood how they behaved.
Every time I try to use them, I find myself poking in the dark as I try different aspect and it never seem to do what I expect it to.
For the sake of argument, I'm trying to convert the frame I get from UIKeyboard's notification.
In landscape...
I recently upgraded to XCode 4. I imported a project from 3.2 and started a build. I got two errors immediately, regarding missing documentation. The project built successfully regardless, but I'd like to remedy the issue.
I compile with the core-plot framework, and the error is specific to some missing files in doxygen.app. After s...
I have a series of images that play in my application (it's only got one view/viewcontroller). Whenever I run the app, the first time I play an animation, it will lag a bit the first time the animation is told to play.
I run my animations via different methods (e.g. "animateJump") which are responsible for loading the correct frames, th...
Hello,
I am looking to create a NSWindow behaving like the dock window:
- Appears when the mouse cursor stays at one edge of the screen
- Does not takes the focus (the app having the focus keeps it) but reveives mouse events
Any idea on how I can implement this?
Thanks in advance for your help,
...
I know in previous version, you could right-click and go to Add > Existing Framework. I can't find a similar option in XCode 4.
...
hi,
if i want to check whether a textfield or string is empty i compare it with NULL or nil?
thks
...
Hi,
I've been scouring both this site and the net in general for an example cocoa app that uses QTKit or Audio Queue and actually works.
Unfortunately, I can't find anything that fits the above description.
All I want to do is get a simple audio recording app so I can learn how it works!
Please, I have put alot of time into this alre...
In my project I roll through a bunch of sql records and populate a NSMutableDictionary with a string for each key. The keys are important because I use them as section titles in my TableView.
The problem I have is that I would like the sections in a certain order. When I call allKeys the order of the keys isn't the same as the order the...
Hi,
I need to know whether I can write the whole class in C++ and use it in XCode using Objective-C?
I need to write a code to query HTML using POST method and I think the best approach is to use either C++ or C#.
Umair
...
Hi,
I'm having problems getting my iPad app to detect its interfaceOrientation in the first UIViewController I initialize (in code). In fact, if I trace for application.statusBarOrientation, that too returns 1 (UIInterfaceOrientationPortrait) even if I launched in landscape.
If I trace self.interfaceOrientation in my first UIViewContro...
I have a string in my cocoa GUI that needs to have special formatting (fonts, colors, etc.). Naturally, I'm using an attributed string. For convenience, I Init the string as an RTF:
NSString *inputString = @"This string has special characters";
NSString *rtfString = [NSString stringWithFormat:@"{@"***LENGTHY RTF FORMATTING STRING *** %@...
Hi,
does anyone knows how can i can call a notification similar to
- (void)applicationWillTerminate:(NSNotification *)notification
which is when app terminate, but what i want is when i drill up a navigation view.
thks in advance.
...
Any good documentation or articles out there about doing device-to-device data transfer?
...
I have a Cocoa application which works fine except it will not invoke applicationDidFinishLauching on my app delegate. applicationWillFinishLauching does work though.
In IB I have set the delegate from "Application" (and also File's owner) to my "XXX App Delegate" object. All other application specific methods are called correctly weird...
controller.modalTransitionStyle = UIViewAnimationTransitionFlipFromLeft;
[self presentModalViewController:controller animated:YES];
Is there any way to make it flipping with a thick border/side? (like iBooks app, when you're switching between books view and the books store)
...
Hi all,
I am a little perplexed and I have been working on this for hours and googling without any real leads. I want to create a callback in objective-c for my iPhone app utilizing the @selector.
Class 1:
- (void) someMethod {
// create selector
SEL successCallback = @selector(successMethod);
// call some service with c...
Hello,
I receive this error for this code-
warning: class 'BeatMaker' does not implement the 'AVAudioPlayerDelegate' protocol
-(IBAction)playBeat3 {
NSString *path = [[NSBundle mainBundle] pathForResource:@"beat3" ofType:@"mp3"];
AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] ...