Hi all,
What is the correct way to release a NSTimer in my dealloc method ? It was created with the following code ?
-(void)mainTimerLoop {
mainTimer = [NSTimer scheduledTimerWithTimeInterval:1/10
target:self
selector:@selector(gameLoop)
userInfo:nil
repeats:YES];
}
Thanks,
Martin...
How do I get my byte array to a string that handles the Swedish letters å ä ö?
I do this at the moment:
NSString *hexString = [NSString stringWithFormat:@"%c", resData[i]];
(resData contains ascii characters)
But when I use the hexString in my output label I get jibberish for all non English chars.
How can I make a selected byte to an ...
This is just a test application, There is only a AppDelegate class to create all I did was create a Window based app, set the supported orientations to only the landscape in the info.plist, and then add the following code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
...
Hi all, I'm a complete iphone/obj-c noob, and this site has proven invaluable for finding my way around the platform.
I have a UINavigationController loading in the first tab of a UITabBarController. I'd like add a refresh button on the right side of the UINavigationItem. My dim understanding is that one has to set properties like tit...
Hi,
I know that ViewDidUnload may be called if there is a problem in an app such as a memory warning. When that view is loaded later, ViewDidLoad is called again. If ViewDidUnload is not called, but a view that was previously shown is moved aside (like in a UINavigationBar), is ViewDidLoad called again? What can be done if one does no...
I'm developin' network game, where players would monitor game news in their client app (Iphones). There would be one server (php based service with mysql) and client with preinstaled my app.
Each user will send (may not to send) information about their location to the server (that is easy) and server will write it to the game's database...
I have an ANSI C code that is about 10,000 lines long that I am trying to use in an iPhone project. When I compile the code with gcc on the command line, I type the following:
gcc -o myprog -O3 myprog.c
This program reads in large jpeg files and does some fancy processing on them, so I call it with the following
./myprog mypic.jpg
a...
Hello,
I'm getting this error msg from the JSON result sent by the Twitter search API.
Any ideas on what it means & how to avoid it? Its kind of a random error, since it does not always appear.
-JSONValue failed. Error trace is: (
"Error Domain=org.brautaset.JSON.ErrorDomain Code=10 \"Garbage after JSON\" UserInfo=0x5c49900 {NSLoc...
I would like to make a UISlider(scrubber) for my AVPlayer. But since this is not an AVAudioPlayer, it doesn't have a built in duration. Any suggestion on how to create the Slider for fast forward, rewind and progress of the playback?
I read the doc on AVPlayer, it has a built in seekToTime or seekToTime:toleranceBefore:toleranceAfter:....
I've googled and researched but am not able to find the best way to iterate through all or some managed objects in my Data Model and update an attribute value in each of them, in my situation, update to the current date. The managed object context and persistent store delegate methods are all in my Application Delegate. I could add som...
I've found a handful of libraries, which claim to be plug'n'play, but without understanding how OAuth even works, I am not confident in my ability to fix any bugs that arise.
Could someone please just give me an OAuth For Dummies lecture here?
...
I am fairly new to programming and I'm doing it, at this point, just to educate myself and have fun.
I'm having a lot of trouble understanding some OpenGL stuff despite having read this great article here. I've also downloaded and played around with an example from the apple developer site that uses a .png image for a sprite. I do eve...
Hi!
I have some code, which works perfect in the simulator, but i cant run it on a real iPhone device and i dont get the reason:
- (void)loadView {
self.title = @"Optionen";
[super loadView];
}
- (void)viewDidLoad {
[super viewDidLoad];
NSMutableArray *strArray = [NSMutableArray new];
NSUserDefaults *prefs = [NSUserDefaults ...
The Core Data documentation says that objects may fault to save memory if needed. What happens if you have an object that has a property that is not a managed property?
For example, say you have a Department class, that is a subclass of NSManagedObject. It has a location iVar + accessors. The location property is not an attribute of Dep...
I've got a ControllerView which will initialize a set of Images-Classes.
Here the basic-initialization in the Image-Class:
- (id)initWithImage: (UIImage *) anImage {
if ((self = [super initWithImage:anImage]))
{
}
return self;
}
How can I inform the ControllerView, when an image has been loaded ?
How could the ControllerView l...
I want to use the property currentPlaybackTime, which returns a double value to trigger a series of if statements at certain points throughout the movie's playback to pause it. Because of the approximate behavior of doubles, it never syncs up with the value in my if statement, and the movie doesn't stop. I can't use a range though becaus...
Hello everyone! I've programmed for a while in Java and .Net, but never really used C or Objective C. I'm still trying to understand a few concepts. I was working on a simple program just to see how I can make an array of structures. Which I believe I got right. I'm having a hard time figuring out how to access the subclasses and store ...
I have two warnings for my project in xcode, both don't stop the app running but I want to make sure I build without any warnings.
I recently removed Flurry from my app, and libsimulate and I can't get these messages to stop appearing despite spending many hours searching for answers on StackOverflow and Google.
I know it must be a sim...
I'm attempting to run an animation so that the scrollview's contentoffset gets continually scrolling down.
However, after each repeat, it will animate from the original position and it is not progressing.
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState: YES];
[UIView setAnimationDuration:1.0];
[UIV...
I have an .aifc file of about 2 minutes that I'm playing using AVAudioPlayer. When I send stop I hear a short 'tick'. When I send play after that I hear the tick again.
I tried setting volume to 0 before sending the play and stop methods, but that didn't work.
The tick is somewhat comparable to the sound you hear when you disconnect yo...