objective-c

Best practice for View-Routing in iPhone SDK

Hey, I've run into a little problem while developing a Core Data driven Quiz and be a bit confused about a best practice to solve my problem. I have approximately five templates for the diffrent questions, wich will be loaded in case wich question is displayed. So I check wich template has question 1 and push the new question-template...

Populating NSTableview from a mutable array.

Hi, I've been attempting this for two days, and constantly running into dead ends. I've been through Aaron Hillegass's Cocoa Programming for MAC OS X, and done all the relevant exercises dealing with NSTableview and mutable arrays, and I have been attempting to modify them to suit my needs. However none of them seem to be using an ar...

action for selecting an index in an indexed uitableview

Hey, I have sectionIndexTitlesForTableView implemented in my controller class. when I selected an index, I want to have my custom action. Is there a way to do it? ...

.NET web service programming with iPhone clients in mind

I need to write a .NET web service which will be consumed exclusively by an iPad app. We are leaning towards using REST but could someone let me know whether this is the easier way (from the iPhone side). ...

Pass a Variable Up the Navigation Stack? - iPhone

Hi, I am able to pass a variable forward from view controller to view controller by pushing its view controller onto the navigation stack. An example of how I do it would be this: MyViewController *controller = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil]; controller.myString = stringToPass; [self.navigatio...

dealloc or releasing best practice in objective-c?

I just simply release objects as such: [myObj release]; I have seen others add: [myObj release]; myObj = nil; Is the latter more advantageous because now there will never be a reference to that pointer? ...

NSFetchedResultsController and NSFetchRequest

Hello, When I assign an NSFetchRequest to an NSFetchedResultsController instance and then try to use that same NSFetchRequest for a small query to the managedobjectcontext I get a memory bad access. Does that mean that every instance of NSFetchRequest can only be used once? Thanks! ...

@class vs. import

Possible Duplicates: What is the difference between @class and #import Objective-C @class vs. #import Hi Can anyone explain the difference between @class and import in objective c? When shall I use which? Is either preferable/more efficient? Many thanks ...

UIFont and Diacriticals

I'm writing a iPhone app that needs to render i18n text that includes diacriticals (tildes, accents, etc.). Apple provides the UIFont class which can be used to get a given typeface/font-size combination's leading, ascent, descent, etc. The problem is that this information does not accurately reflect diacriticals. Specifically, diac...

I can't get UIWebViewDelegate to work

I'm trying to implement a UIWebViewDelegate in my application and I cannot for the life of me get it to work. I would really appreciate a second set of eyes on this. I know the name MapViewController is confusing, but the WebView is controlling a map (not UIMapView). Here's the bulk of the code: MapViewController.h #import <UIKit/UIK...

push view when touchesBegan

I have a apps with a navigation controller, when the user is in a specific view, He can touch a scollview and I want a push the rootViewController. So, I have subclasses uiscrollview, and in the method "touchesBegan", I want a push the rootviewcontroller, but I don't have access to the navigation controller! How I can do that? thanks, A...

code quick view disapeared in xcode.

hi, im using xcode for programming objective c. for anyone that uses it, you'll know that on the left are the files in your project, and when you click one once, the source code shows up on the right side of the xcode window. however I have done something im not sure and that view has disappeared and I have to double click each file and ...

iPhone Xcode UIButton Title Will Not Appear

So I am making an iPhone program and for some odd reason the title of my UIButtons will not show... am I missing something?? I get no errors or even warnings on compilation and my buttons and everything appear, just the title is not being shown.... FurballViewController.m ... -(void)loadView { UIButton *btn = [UIButton buttonWith...

What are good tactics to do function extraction in Objective-C to create clean code?

In the book Clean Code the author recommends breaking large methods into small functions that do one specific thing. In languages like Java this translates to pretty, readable code. public static String renderPage(PageData pageData) { includeHeader(pageData); includeContent(pageData); includeFooter(pageData); return page...

how to get the user list those who are access my facebook application through my iphone apps

Hi, i am creating an iphone apps which need to use facebook login details to enter into the apps as Groupon iphone apps. In Groupon, they are using FBConnect to access their facebook application, based on the login success they are allowing me to access their deals. I had used FBConnect package to post some message to user's wall using...

Optimizing a UIScrollView with a lot of subviews

Hello, I have a UIScrollView that I am using to simulate a UITableView like interaction because rows are a bit more complex than what UITableView has to offer. I have 4 UILables a UIImageView and a UIButton for every row. The end result is a lot of subviews. Even with only 10 rows,the scroll view that looks fine in the simulator bu...

"Tab" between controls without tab key

I have a window which happily tabs between its controls using the tab and and shift-tab keys. However, I also want to be able to move between controls with the up and down arrow keys (in this case). How can this be achieved? ...

Delete particular row from table view

Hi Guys, In my app, I want to delete particular row from table view. Table view contents are coming from database and after getting data from database then I pushed to array. Then I reversed an array, Here after I am displaying content in table view. My problem is that when I am trying to delete the second row of table view on behalf o...

NSFetchedResultsController crashes on every save operation

Even when I commented out every single activity within the delegate methods, every time I call an "managedobjectcontext save:nil" operation, the app crashes with different erros namely the following: (seems like a release problem but not sure where. I get EXC_BAD_ACCESS) #0 0x02813a93 in objc_msgSend #1 0xbfffd5b0 in ?? #2 0x0236c1b...

Embedded resources in Objective C?

I have a library in both C# and Java that use some XML files to generate a lot of objects. I use them so I don't have to hardcode it in both languages, and can easily update the data. In both C# and Java I can embed these files into the DLL/Package. How would I proceed to do something like this in Objective-C? ...