Hello,
I'm trying to get the GKTank example working with 2 iPhones. Both have bluetooth enabled. I start the app on both devices and tap the screen. The Peer Picker comes up and the devices find each other. If I select one device in the list it says "Waiting for {other iPhone}..." forever. On the {other iPhone} the waiting phone gets gra...
I'm using an NSDecimalNumber to store money in Core Data. I naively used stringWithFormat: at first to format the value, later realizing that it didn't support NSDecimalNumber and was instead formatting the pointer :(. So after some reading through the docs I learned to use the NSNumberFormatter to get the format I wanted. But this just ...
I'm making an iPhone game where the main actor is a ball that rolls depending on the device's accelerometer rotation.
I haven't started on this part of the coding yet, but I was wondering if you guys had a nice way of solving this:
I tried looking a little into chipmunk, and I noticed that bodies have the property v, which is a point c...
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Congratulations" message:message delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"View", nil];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(110, 100, 80, 80)];
NSString *imagePath = [NSString stringWithFormat:@"%@", [Array objectAtIndex:x]];
...
Hi
I'm currently hunting down a memory leak in my app for iPhone. I'm using Instruments to track down the code that is causing the leak (becoming more and more a friend of Instruments!). Now Instruments show two lines: one in dark blue (row 146) and one in a lighter blue (150). From some trial and error I get that they are connected som...
like build in apple notes app, after you swipe to delete the selected row, it will select the nearest available row automatically.
The logic should be:
if row count > 0 then
if deleted_row == last row then
select deleted_row_index-1 row
else
select deleted_row_index+1 row
end
end
i have try to implement the above log...
Is there a good way to provide custom transitions between view controllers? For example, in the Photos app on the iPad, tapping on a photo album changes the navigation controller, but it also animates nicely into the grid of photos.
Thanks.
...
for my app each annotation on a map corresponds to a mine locality. each mine has its own unique 7 digit integer identifier. I'm trying to add the property minesEntryNumber to the annotation so when the annotation is clicked on later I can bring up specific information on the selected annotation. This is part of my code:
for (id min...
Gday, I am trying to create a tiled map for my game, i have had this previously working using other xml methods but i had memory leaks and all sorts of errors. However i had a map load time of about 2.5 - 3 seconds.
So i rewrote all of the code using NSMutableStrings and NSStrings. After my best attempt at optomizing it i had a map load...
I read the other posted solutions to using structs and resolving the "Expected specifier-qualifier-list before struct" related errors, but those aren't working. Is it different in Objective C? Do I need to declare my struct somewhere else in the class? It gives me the error on the line where I declare the typedef. Here is how it look...
hi all,
I am using sqlite database to save data from our xib.
When I add first time then its added successfully but when i repeat that process then it shows run time exception and exit from program,and shows variable is not CFString.
...
I have created UITextField in UITableViewCell in my app, and I receive strange memory leak with it.
When I launch my application and tap this UITextField - there is no problem with it. I can type text in English, no leaks at this moment.
But when I press globe button on a keyboard to switch to another language(for instance, Russian), I...
I am deleting contacts from addressbook programmatically. I got error "There's already an instance of AddressBookSync running" on console and my application is not responding. There are 5000 contacts in addressbook.
When iSync preferences option "Enable Syncing on this computer" is unchecked then all is working well.
But when it is che...
Hi all,
Currently I'm stuck on this problem of showing multiple lines of subtitles on a map annotation callout. I've found some tutorials that provides a custom callout, however, I'd prefer to use the default callout view, but with multiple subtitles (2 lines of subtitles, for example). Thanks in advance!
...
How to get opacity in increasing order in uitableviewcell in iphone?
I want to get the screenshot which is on itunes typed D&G.
...
Hi,
I created four language files for my app: two for the preferences and two for the strings. I added them into Xcode and it works great on the phone but the string files are shown as "Localizable.strings (de)" and "Localizable.strings (en)", while I have two files called "Root.plist" under the "Settings.bundle" in the groups "de.lproj...
How do you initialise a constant in a header file?
For example:
@interface MyClass : NSObject {
const int foo;
}
@implementation MyClass
-(id)init:{?????;}
...
I'm trying to switch views between view controllers in my iPhone app, but it crashed.
Basically I'm switching from mainScreen to test.
I get an error in the debugger:
0x01d6a000 <+0000> push %ebp
0x01d6a001 <+0001> mov %esp,%ebp
0x01d6a003 <+0003> int3
0x01d6a004 <+0004> leave (HIGHLIGHTED)
0x01d6a005 <+0005> ret ...
Hi all,
I want to stop my app from loading more annotations after they are all added ( they are added by the user one by one), as the app otherwise crashes. How would you do that? the following code is what i think is important
(void) loadAndSortPOIs {
[poiArray release];
nextPoiIndex = 0;
NSString *poiPath = [[NSBundle mainBundle] ...
I'm writing an iphone apps that receive data from an udp socket i can dispay what i receive using NSDATA description but is in hex format and for example it look like this:
<4c61742c 34343039 3131302e 35302c4c 6f6e2c39 38343237 352e3934 2c482c32 37392e30 302c4b6e 6f74732c 302e3032 2c4e616d 652c504c 41594552 2c496e64 65782c30 2c4d756c 74...