Hi Guys,
First off, please forgive the stupidness of this question but Im not from a C/C++ background. I'm a little unclear about what the difference in roles between the .h and .m files when it comes to properties.
I understand the concept of interfaces, and I see that in part the .h file is an interface for the implementation, but ...
Hello all,
I am using function random()%x for the generation of a random number, but every time I start the application I see that it creates or generates the same number.
Like I am placing some images randomly based on that random number and I see all the images are placed at the same place no matter how many times I run the applicat...
I have an aesthetic UI element, a reflection, that works well on the iPhone 3Gs and iPod Touches, but is too slow on the 3G and prior. How best can I detect CPU speed so I can disable this function?
...
I am getting a warning about setText method when I am not even using it. Why does XCode display this warning message?
...
I have a method in a UIViewController of my iPhone application (inside a UINavigationController) that is called whenever a row is selected in the table in the ViewController's view. In this method, I access array of "Dream"'s stored in an instance field dreamsArray, which contains NSManagedObjects from my database. I can access objects f...
Problem is evident in both the code I've written and Apple's sample AddMusic code (http://developer.apple.com/iphone/library/samplecode/AddMusic/index.html runs on Device Only).
Once you open MPMediaPickerController when you click on an item it appears to be impossible to subsequently unselect it. It actually just gets added to the MP...
I've been working on a game and implementing the physics stuff with chipmunk. All was going fine on the cocos2d part until the integration with chipmunk. A bit of background:
The game is a game with blocks. Levels are defined in a property list, where positions, size of the blocks, gravitational forces, etc., are all defined for each bl...
Hello, I have a button that plays a sound and i want to prevent users from tapping the button multiple times and having the sound play more than once. I need a way to check if a sound is already being played when the button is pressed and if so, don't play it.
I suppose i could start a time when the button is pushed that is the exact le...
My iPhone application blows up when it accesses an instance variable from within one of the UITableView delegate methods. I think I'm retaining it so I do not understand why I can't access it without a problem.
Here's my .h file
#import <Foundation/Foundation.h>
#import "AlertSummaryCell.h"
#import "AlertDetailViewController.h"
@inte...
I am using C++ to develop the algorithmic part of an iPhone application, and I am encountering a strange bug. The code that I have, compiles fine with gcc-4.2 both on Linux, on the Mac, and on the iPhone device, just not on the Simulator, which makes debugging and testing very difficult.
The error messages from the attempts to compile ...
Hi,
I'm amused by a strange error that I'm encountering in my program.
I have a tableViewController with a navigationBar. When the user clicks on an ADD button on the navigationBar, they're presented with a modal tableViewController. This viewController has a CANCEL button on its navigationBar (which dismisses the viewController via de...
Does anyone have a simple tutorial on how to easily add a TextView to a TableView? Basically re-creating a Settings-style grouped tableview type thing.
...
Hi everyone,
I'm having an odd issue trying to present an MPMediaPickerController using presentModalViewController. I had it working fine, but recently (perhaps as of 3.1, I don't exactly recall the last time it was working) the MPMediaPickerController just refuses to show itself. The screen just remains black, with nothing but the sta...
It strikes me as a good idea for Apple to negotiate with Novell and bundle the Mono Touch runtime (only the runtime of course) into every iPhone and iPod Touch. Perhaps even make it a "one time install" that automatically gets downloaded from the App Store the first time one downloads an app build with Mono Touch, making every subsequent...
It sure seems like the Xcode debugger has been playing a dirty trick on me for the last couple hours.
I was working with this code which has--in hindsight--a pretty obvious bug, but it wasn't obvious at the time:
- (UIImage*)loadBundleImage:(NSString*)imageName {
NSBundle* bundle = [NSBundle mainBundle];
NSString* path = [bu...
I use this code to keep track of last reboot:
+ (float) secondsSinceLastReboot{
return ((float)(mach_absolute_time())) * ((float)timebase.numer) / ((float)timebase.denom) / 1000000000.0f;
}
I assumed mach_absolute_time() was based on last device boot time like it is on a mac. It doesn't seem to be based on that. I actually have ...
Hi,
I'm creating a static library for use in iPhone applications. It contains a number of source files which export no symbols, all they do is instantiate a static instance of a class which then runs some code in its constructor that registers various things with a central manager class elsewhere. This all works fine when the code is bu...
In an attempt to create a workaround for centering an image in a UIScrollView and make it behave as Apple's Photos app does, I need to get the current zoom level and use the number to calculate the amount the image should be inset at each zoom level.
(Note: I am aware that some programmers are centering an image in a scrollview by cent...
I want the first view in my UINavigation Controller grouped, but I can't see where to initWithStyle as UITableViewStyleGrouped.
My MainWindow.xib is set up like:
File's Owner (Outlets: delegate-Test App Delegate)
First Responder
Test App Delegate (Class: TestAppDelegate) (Outlets: navController-Navigation Controller, testListControl...
I've got a Navigation iPhone app and it's "second level" controller is currently a UIViewController whose Nib contains a UIView. I made space at the top of the UIView for a navigation bar and then I added a tool bar on the bottom, on which I put a refresh button, a label, and an activity indicator. Last, but not least, I put a table vi...