I have a very straight forward class with mostly NSString type properties. In it, I wrote a trivial implementation of the description method. I found that whenever I try to include "self" in the description, it crashes my iPhone app. An example is something such as the following:
- (NSString *)description
{
NSString *result;
re...
Is there an easy way to import AddressBook data into the iPhone Simulator?
Right now my only assumption is to manually modify the SQLite files found in the /Library/Application Support/iPhone Simulator/User/Library/AddressBook.
...
Given the statement:
const char *sql = "INSERT INTO FooTable (barStr) VALUES (?)";
is the following use of sqlite3_bind_text (and related sqlite3_bind_* functions) sufficient to prevent SQL injection attacks?
sqlite3 *db;
sqlite3_stmt *dbps;
int dbrc = sqlite3_open([dbFilePath UTF8String], &db);
if (dbrc) {
// handle error
...
I have an app that's half way done. The performance is not really good, and I wonder where the bottlenecks are. Although I can go ahead and start commenting out suspected lines of code, I wonder if there are any tools that would tell me which method cool took how long and what happened next. The stack trace isn't really that helpful.
I ...
Hi
I am debugging my application on iphone (OS 2.0) using X-code 3.1 iphone SDK 3.0 beta 5 . My application crashes giving message
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray insertObject:atIndex:]: index (8) beyond bounds (8)'
2009-05-23 17:13:32.304 myApp[405:5a07] Stack: (
808163835,
...
I'm going through the Beginning Iphone Development Apress book and I'm constantly getting problems when building my NIB files. My practice apps crash because of the NIBS. I now this because I'll just trade out mine for the sample ones and the app will work. I'll look at the sample nib and all of my connections will be the same. I'm havin...
how do i show a background image on a navigation bar or give tint color to the navigation bar in a native iphone application??
...
I would like to do some customization of the UIPickerView.
End Goal: have a picker view rotating a few icon sized images.
firstly i would like to change the black/grey boarder surrounding the spindle to a transparent colour. i.e. [UIColor clearColor];
Then shrink the picker view down so it is relatively small, (probably around 40 x 40...
Is it possible to connect an iPhone to another iPhone or any other network client talking that game's protocol.
I was thinking that I could use the same NAT Traversal technique used in the XBox 360 to host games on users XBox's through Firewalls.
For NAT traversal to work effectively I'd have to have a central server that would allow c...
Hi,
I've released an app update which does an upgrade of the database ie. executes a script file in the bundle that adds a column to existing table , etc. I've tested this by deploying previous version builds on my device from xcode and then deploying the latest version. The upgrade worked fine.
Yesterday my distribution build got...
This may seem stupid, but I still couldn't figure out how to mark a attribute as a primary key in the xcdatamodel file.
My persistent storage is sqlite file.
Can anyone help me?
In that case, how can I "validate" a ID to be unique?
Should I write a validation method or something?
...
I want to write some functions for that, but before I do: Are there any to convert between time units?
...
On an iPhone, how do you figure out the width of a table view cell's content view when it is showing a certain accessory view (disclosure indicator, etc)?
I need this in order to calculate the correct cell height for cells that contain wrapping, variable-length text. But when the table view delegate is asked for a cell height, it doesn...
I signed up for the iPhone Developer Program (now awaiting approval) using a new Apple ID, this ID is different from the one I used on my iPhone for iTunes/AppStore purchase.
I only have one iPhone and want to use the same device for app testing and day-to-day phone use. I can not try out yet but I guess iTunes/XCode will use the new A...
When I need to load a view programatically I do the following:
MyController* myController = [[MyController alloc] init];
[[NSBundle mainBundle] loadNibNamed:@"myNib" owner:myController options:nil];
// use my controller here, eg. push it in the nav controller
This works fine, but my controller's viewDidLoad is never called. So I resor...
I've a Core Data application. In the producer thread, I pull data from a web service and store it in my object and call save.
My consumer object is a table view controller that displays the same.
However, the app crashes and I get
NSFetchedResultsController Error: expected to find object (entity: FeedEntry; id: 0xf46f40 ; data: ) in s...
this way works:
type1ViewController *viewController = [[type1ViewController alloc] initWithNibName:@"Type1View" bundle:nil];
viewController.parentViewController = self;
self.type1ViewController = viewController;
[self.view insertSubview:viewController.view atIndex:0];
[viewController release];
but this way gives me the error, "request...
Hello,
I have a form on a page that has a submit button. If I hit the submit button it posts a jquery POST to another page and logs a user in. Works fine if I use the submit button on the page. If I click 'Go' on the numeric keypad it just refreshes the page.
I assume this is because he form is like this (using iWebkit)...
<span class...
I've got a timestamp as a string like:
Thu, 21 May 09 19:10:09 -0700
and I'd like to convert it to a relative time stamp like '20 minutes ago' or '3 days ago'.
What's the best way to do this using Objective-C for the iPhone?
...
You know how Mario just keeps running to the right when you press and hold the right-button on the D-Pad? In the same manner, I want my UIButton to continuously fire its action for the duration that it is held down. Is this possible for a UIButton? If not, is this possible to do with a UIImageView by overriding a touch handling method in...