objective-c

How do I make a header row with a gradient background in my NSOutlineView?

I am using an NSOutlineView in my App so i downloaded Apples Photo Search Sample App which uses an NSOutlineView. While using it I noticed that it gives the root object of the outline view a Gradient Background, so I looked through the code but I couldn't see what did it. Would someone mind looking through the code and then telling me wh...

Move an UIImageView around in a UIScrollView

I'm creating an application where I want to let the user move (not pan) an UIImageView around by dragging it on the screen. Additionally, I want the user to be able to zoom the UIImageView in and out. As such I've been using a custom UIScrollView that forwards single touches to the 'contentView': @implementation JM_UIScrollView - (BO...

tabbar set focus

hi i m making an application in iphone in which am creating tabbar in my idocviewcontroller class,In homeviewcontroller class there is button on which click i navigate to class askadocviewcontroller class. The problem is that view is navigate but askadocviewcontroller tabbar is not selected with navigation from home to askadoc. it select...

Weird issues with IKImageBrowserView reloadData

Hi, I'm seeing some weird things reloading the data in my IKImageBrowserView in my garbage collected, Leopard app. Basically depending on how I change the contents of my "filteredItems" NSMutableArray I get a different loading behaviour. If I refresh the contents like this the IKImageBrowserView seems to ignore the imageUID and reload ...

Animating NSDrawer

How can I open and close a drawer in a Cocoa Application using a smooth animation? ...

Calling popToRootViewControllerAnimated after UIImagePicker finish or cancel? (iPhone, Objective C)

I am trying to implement live camera functionality in my iPhone application and am running into trouble. Basically, the way it is structured is this: I provide a UINavigationController wherein the user can navigate to an image with a table view and (upon choosing one) a detail view. They can then click on a button and take a new photo w...

sectioned tableview

hi, i am making an application in iphone, in which i am creating tableview with 2 sections. i have created sections parts of tableview, but the problem is that i need different images in every cell of each section. anyone has any solution for this ...

Verify receipt for in App purchase

I have been playing around with in app purchases for a few days, everything works fine up until the point where I try to validate the receipt with the app store, as i am constantly getting back an invalid status. I am passing the receipt data to my PHP server then forwarding from there to the app store and once I get a valid response I...

What does 'Nil' represent in Obj-C?

So there 's NULL, which is used for pointers in general, and nil, which is used for object pointers. Now I see there's also Nil, which is used by lower-level Obj-C runtime functions like class_getProperty. Is this somehow different from nil philosophically? (yes, I know they're all actually 0) Why was it even introduced? Or, if Nil wa...

Reference for the C methods used in iPhone development

Is there a good reference somewhere with all the C functions that can be used by default in iPhone development (I guess they lie in the Foundation framework)? I mean functions like: arc4random(), cos(), sinf(), hypot(), sqrt(), sqrtf() etc... They are so many considering their variations too (sin(), sinf()) and googling every single tim...

NStimer from NSThread

iphone project. How can i call NStimer from NSThread? I tried with no luck. ...

Group header files in C and/or Objective-C

I have on occasion used a header file purely to import a group of related header files that describe the interfaces on all public components of a module. This was done for convenience. Anyone using the module need only import the one header file. Is this practice recommended, and if so does said practice have a name? I am trying to name...

Can I develop my own objective-C Framework for Cocoa Touch Applications?

Is it possible to create an own obj-C Cocoa Touch framework which can be used by other developers? And furthermore can you protect this framework? ...

iPhone dev - NSInternalInconsistencyException help?

2009-08-19 11:00:06.482 Pickers[26090:20b] *** Assertion failure in -[UIDatePickerView _updateBitsForDate:andReload:animateIfNeeded:], /SourceCache/UIKit/UIKit-963.10/UIDatePicker.m:908 2009-08-19 11:00:06.483 Pickers[26090:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter n...

Generate JSON object with transactionReceipt

Hi, I've been the past days trying to test my first in-app purchse iphone application. Unfortunately I can't find the way to talk to iTunes server to verify the transactionReceipt. Because it's my first try with this technology I chose to verify the receipt directly from the iPhone instead using server support. But after trying to sen...

Using NSManagedObject manually - something wrong with the NSManagedContext I get?

Hey all, I'm new to Cocoa programming, and decided for my first project to create a small application to monitor and remember certain battery stats for my laptop. (I have it plugged in most of the time, and apple recommend you discharge it now and again, so why not try to make a small program to help you remember to do this? :)) Anyway...

How to convert this Perl Skript (Sipgate API) into Objective C / Cocoa?

Hello, does anyone have a small sample how to comunicate with the Sipgate Webservice in ObjC? I´ve never used Webservices at all and I didn´t get it. Here is a small Perl Skript, provided by Sipgate, on how to send SMS with their Webservice: #!/usr/bin/perl -w # # Sam Buca, indigo networks GmbH, 08/2007 # # This script is a very basic ...

How to get the on-screen location of an NSStatusItem

Hi Fokes, I have a question about the NSStatusItem for cocoa in mac osx. If you look at the mac app called snippets (http://snippetapp.com/ look @ the movie there). you will see that once you clicked your statusbar icon that a perfectly aligned view / panel or maybe even windows appears just below the icon. My question is ... How to c...

Cocoa-touch - implementation files?

In Xcode, you can view all the header files of the cocoa-touch framework, but I'm just curious to see what some of the implementations look like. Is there a way to see them? They must be on the system somewhere, right? The header doesn't do anything without the implementation. ...

How can you read text files?

Hey guys, How do you read text files in objective c? I just need the coding. Thanxs. ...