objective-c

OAuth with Google Reader API using Objective C

I'm using the gdata OAuth controllers to get an OAuth token and then signing my requests as instructed. [auth authorizeRequest:myNSURLMutableRequest] It works great for GET requests but POSTs are failing with 401 errors. I knew I wouldn't be able to remain blissfully ignorant of the OAuth magic. The Google Reader API requires paramet...

digital zoom iphone sample code

Hello everyone, any one has sample code or know of a tutorial on how to do a digital zoom for an iphone? or digital zoom in general ? thank in advanced. -Amir ...

Strings wont combine - Objective C

Ik have the following strings in the .H file, and i want them to merge into one string at the end of the app when the have collected their data. It wont work, why not and how must i do it correct so the data collected in these strings will be merged into one string ?? NSString *dataHML; NSString *dataHML2; NSString *dataHML3; NSString...

Adding Extra Title Attributes to MKAnnotation?

Currently I have a subClass of MKAnnotation and I was wondering if its possible to add extra tile attributes. Currently MKAnnotation adds Title Subtitle Is there a way I could add two more lines / NSStrings to allow 4 lines of text? Title SubTitle Location Date gary ...

How to recreate the default UIView the same as the default tableView:viewForHeaderInSection:?

I tried to implement the - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section to get the text label of the header in section of black color instead of the white color, but it looks so different from the default one created by the SDK, mine is so ugly. How to recreate the UIView with exactly the sa...

Adding Parsekit To An Xcode Project

I am trying to add the Parsekit framework to my OSX Xcode project. I've never added a 3rd party framework before and I can't get it to work right. I dragged the included Xcode project into my 'Groups & Files' pane and chose to Add it to my project. I then dragged Parsekit.framework underneath the Link Binary With Libraries heading. Then...

NSString, what does localizedString mean?

I am sorry if this is an FAQ, but what is the difference between the two statements below? I have been looking on google and also on Apples documentation and I can't seem to find a salid difference. My best guess is the localised one is optimised to be updated at runtime. Could anyone kindly clarify for me? NSString *title1 = [NSString ...

How to create a literal XML string with Objective-C?

I have long XML strings that I'm hard-coding into an iPhone project's unit tests. It's pretty ugly having to escape all the quotes and line breaks -- for example: NSString *xml = @"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\ <root>\ <element name=\"foo\" />\ </root>"; It would be really nice to have a lower-friction way to do th...

How can I convert data received from a URL call into NSString?

I am trying to make a simple url call. I cannot convert the bytes into NSString. Following is my code. I get this in my console message; data received from url: †F»∞ -(void)buttonClicked{ NSLog(@"Hello Login clicked..."); NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; request = [[NSMutableURLRequest...

Pass string from tableviewcontroller to viewcontroller in navigation stack

How should I pass a string to the view controller that gets pushed when a tableviewcell is selected. Should I create a custom init method in the view controller? eg [[myvc alloc]initWithURL:...] Set a property? eg [myvc setURL:...] or myvc.url = ... or just create a custom method? [myvc setLoadingURL:...] ...

Memory problem with basic UITableView when scrolling

I have a very simple UITableView that has 3 sections, and 3 rows per section. #pragma mark - #pragma mark UITableView delegate methods - (NSInteger)tableView:(UITableView *)tblView numberOfRowsInSection:(NSInteger)section { return 3; } - (UITableViewCell *)tableView:(UITableView *)tblView cellForRowAtIndexPath:(NSIndexPath *)index...

Objective-C properties are not being recognized in header file?

I wonder if I'm doing something completely stupid here... I'm clearly missing something. I've gotten used to the pattern of defining properties of a custom class, however I seem to be hitting a point where extended classes do not recognize new properties. Case of point, here's my header file: #import <UIKit/UIKit.h> #import "MyTableView...

What is the best way to start a movie the first time your app starts

I want to have a movie start the first time my app is launched to train users on its use, say a 50 second clip. How would I go about doing this in an iPad app? (I am building a very complex platform that has hooks into the web and need users to be aware of that. The video will explain that users can go to the website for different feat...

View XIB & Window XIB

Possible Duplicate: Where is the difference between an Window XIB and an View XIB template for iPhone OS > User Interfaces? What are the differences of these in iPad programming? ...

@property objective-c syntax

I'm looking for the syntax of the getter/setter. Which is the setter and which is the getter?? Is the readwrite attribute the getter? Is the assign the setter? @interface SomeClass : NSObject { NSString *str; NSDate *date; } @property (readwrite, assign) NSString *str; @property (readwrite, assign) NSDate *date; ...

Static variable for communication among like-typed objects

I have a method that asynchronously downloads images. If the images are related to an array of objects (a common use-case in the app I'm building), I want to cache them. The idea is, I pass in an index number (based on the indexPath.row of the table I'm making by way through), and I stash the image in a static NSMutableArray, keyed on th...

Testing for contents of an NSArray without risking range error

I'm foolishly saying: if ([imageCache objectAtIndex:index]) { Problem is, on my first time through this, I haven't put ANYTHING in my NSMutableArray *imageCache, and this croaks with a range error. How can I ask an NSMutableArray whether it has anything for a particular index? ...

Can't get label to show over background of grouped UITableView

I am trying to get a label to show over part of the grey-space in a grouped UITableView, but it only appears if the label is in a cell. I have tried adding the label as a subview of both the ViewController and the tableView and bringing it to front, but in either case it only shows over the white-space of a cell, not over the grey-space...

iPhone OS: Get a list of methods and variables from anonymous object

I am building my first iPhone/Obj-c app and I have a large amount of data-holding subclasses that I am passing into a cite function. To the cite function these objects are anonymous and I need to find a way to access all the variables of each passed object. I have been using a pre-built NSArray and Selectors to do this but with more than...

Dynamically changing position of a UIView

Hello- Here's my setup. I have a viewcontroller that I'm creating and adding as a subview. The viewcontroller presents some options that a user can chose from. The viewcontroller is being pushed in response to a "long press" gesture. Within the viewcontroller, I added a child UIView to group some other controls together so I can move th...