Hey!
I am making an app to read news articles from a website on the iPhone. I would like to be able to share these articles on Facebook, using a password and email-address that was set somewhere programmatically (not using Facebook-Connect, mostly because I want the design to be the same, whether you log in to Twitter from the app or in...
Just when I thought I've understood this topic completely, I'm back to basics.
I have a method that instantiates an autoreleased object, using (for example) stringWithFormat:
return [NSString stringWithFormat:@"what"];
Then I call this method from another method, and another method, each time returning this autoreleased NSString and ...
Hello stack overflow,
So I have a table view that contains a bunch of data. The user can navigate down, browse edit, etc. However when they edit and delete a row, and then navigate back via the nav controller, sometimes (not all the time) the app crashes throwing this error:
-[CALayer resourceType]: unrecognized selector sent to inst...
Why can't I observe the editing property of an instance of UITableViewController?
I'm using the following code:
[self addObserver:self
forKeyPath:@"editing"
options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld)
context:NULL];
And have implemented the method:
- (void)observeValueForKeyPath...
Hey,
If my application is called "Media Player", is it a best practice to name classes: MPSong, MPSinger, MPAlbumsViewController ... ?
...
I'm enconding this data with this line:
NSString *authString = [[[NSString stringWithFormat:@"%@:%@", email, password] dataUsingEncoding:NSUTF8StringEncoding] base64Encoding];
for a basic HTTP Authentication
It works quite perfect but i'm getting this warning:
warning: 'NSData' may not respond to '-base64Encoding'
is there ...
hi, i use the code below to insert data into my sqlite-database but for some reason the application always crashes as soon as the method gets called and the problem seems to be the "sqlite3_open" statement. Does anyone have any idea what i might be doing wrong?
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Animals";
animals...
Is there a method, like containsObject: for NSMUtableArrays to check if an object exists in there without having to loop through the whole array and check each element? What's the best way to check if an object exists in an NSMutableArray?
...
I have my main app view controller (File's Owner), its First Responder, View, and 3 other UIViewControllers in the same nib file. Every one of the 3 UIViewControllers is referenced on the main UIViewController as an IBOutlet.
My question is, when does the main UIViewController init those 3 UIViewControllers, in its life cycle (my guess...
is there any way to customize the ABPeoplePickerNavigationController and let user select multiple contacts without going into details? I can push contacts into an array as user selects them but there's no way to give visual feedback back to user that he/she selected the contacts he clicked (or unselect them on second click).
I don't wan...
I have a use case where a UIWebView may need to connect with a web server secured with NTLM. I also have a use case where I already have the credentials to be passed. So instead of forcing the user to enter them, how do I perform the handshake with the UIWebView?
UPDATE:
Using this method here works well enough when you are doing sim...
Hello!
This seems like pretty standard code straight from the doc, so I'm not sure what I am doing wrong...
My 3-component picker doesn't look right when it loads, with the selection indicator being placed too low across the picker (so the grey bar is correctly placed, but the clear raised-looking overlay is too low).
Then, when I sel...
I'd like to alter images programmatically. Specifically for the iPhone, but, general answers could help. For example, how could I, programmatically, add filters effects, such as those available in Photoshop.
Clearly it is possible as exemplified by apps such as Fat Booth. What is the starting point for this? Load an image as NSData and ...
I have 2 entities. entity A will hold many entity Bs and order will matter.
if i check the little box that says 'indexed' in xcode, how do i go about using that index, if i even can? ( i know that i CAN use it in some way: http://cocoawithlove.com/2008/03/testing-core-data-with-very-big.html but i am not so spiffy with Obj-c yet.)
I h...
How can I call a static method asynchronously?
+ (void) readDataFromServerAndStoreToDatabase
{
//do stuff here
//might take up to 10 seconds
}
...
I am trying to save an array of images to the documents folder. I managed to save an image as NSData and retrieve it using the method below, but saving an array seems to be beyond me. I've looked at several other questions that relate and it seems I'm doing everything right.
Adding the image as NSData and saving the image:
[imgsData a...
I started out with some items as NSWindows but my GUI is evolving and these elements would be better suited as NSViews. Is there a way to convert an NSWindow NIB into an NSView NIB?
...
I have a piece of code that uses NSURLConnection to fetch a network resource asynchronously and parse some XML as it streams in. The XML parsing is handled by libxml2 which is available as a framework in the iOS SDK. This works perfectly when I invoke it once, parse the XML and release the resources by calling xmlFreeParserCtxt(ctxt).
...
Hi all
I am developing an app on iphone that lets user take photos, add comments & GPS location to it and send it as an email to another user.
If the recipient has installed the same app & when she clicks on the attachment the same app will launch & parse these details & show them to the recipient. (I intend to use UIDocumentInteractio...
how we can change the tabbarcolor
...