objective-c

Compiling an Objective-C program

I'm having problems compiling the following program. I'm using "gcc -framework Foundation inherit8.1m" and get the following errors. What am I doing wrong? Thanks. ld warning: in inherit8.1m, file is not of required architecture Undefined symbols: "_main", referenced from: start in crt1.10.5.o ld: symbol(s) not found co...

Edit Cell in Selected Row

Apparently, I've been working with bindings too long, because I can't figure out how to do this. I have a table with several columns. When a row is selected, you can edit its priority, which modifies a core data attribute. I've also set this as an IBAction. Basically, I want to access the value of the Core Data attribute from my code...

My plugin crashes Interface Builder

I built a custom control and an IB plugin for it. If I run the plugin using IB as a custom executable from the plugin project everything works like a champ. But if I copy the framework and plugin to the "normal places", create a test app for it, and run the simulator - IB crashes after it returns from the simulator. I've scoured the w...

Byte array in objective-c

How can create a byte array in objective c programming ... i have the data that is "0x12,0x23,0x34,0x45,0x56,0x67,0x78,0x89,0x12,0x23,0x34,0x45,0x56,0x67,0x78,0x89" i want it prepare as a byte array... pls help me.. ... if anybody have any sample project.. pls give me... ...

Why does this property need the 'retain'?

Given the following definition of a class with retain properties: @interface FeedEntry : NSObject<NSCoding> { NSURL* url; NSData* source; } @property (retain) NSURL* url; @property (retain) NSData* source; @end @implementation FeedEntry @synthesize url; @synthesize source; -(void)encodeWithCoder:(NSCoder*)coder { [cod...

How to compare objects in Objetive-C?

How do I compare two objects of a custom class? My idea was to add an additional method to the class in which I can compare the current object with another object of the same kind. So I can write my own code how each field of the class is compared. This is how I would do it. Or are there some predefined methods to do that? Like "isEqua...

Where is the difference between writing 0.1 and 0.1f in objective-c?

Sometimes I write a float like: 0.1 and sometimes I add an f, like: 0.1f It often seems that both ways work. I picked the f up from some sample code. But what's that actually good for? I'm sure it means "float", but do I really need that? ...

Game Slow down issue.

Hi all, I am developing a game in which i have to move the ball and power up image simultaneously. For move a power up image view, I create a separate thread and call move method of power by using [self performSelectorOnMainThread:..], this is required to show the updated position on view. But my Game slowdown after creating this thread...

How can i hidden statusbar in iphone OS 3.0 ?

i have a iphone application where i use image pickerview for select the photo from iphone photo library.In Info.plist file i use statusbar hidden. In iphone OS 2.2.1 statusbar are not show.But when i debug this application in iphone OS 3.0 then statusbar are shows.But not at the beginning shows when i call imagepickerview for select phot...

UIScrollView touches vs subview touches

Please can someone help sort a noob out? I've posted this problem on various forums and received no answers, while many searches for other answers have turned up stackOverflow, so I'm hoping this is the place. I've got a BeachView.h (subclass of UIScrollView, picture of a sandy beach) covered with a random number of Stone.h (subclass o...

Reordering UITableView sections on the iPhone by dragging (like reordering rows)

Is there anything currently in the SDK that allows for re-ordering of tableView sections? As in, move the entire section below or above an adjacent section? This is plausible with individual UITableViewCells. Haven't seen it done for sections though. ...

Is there an issue to use int for class property?

When I started with Cocoa, I remember that I read somewhere that int/float and similar should not be used for class properties and to use NS* equivalents (like NSInteger). Is there a real hidden issue here why would that be better or it was just a voluntary coding rule by a person where I read that (and I can't for the life of me find w...

Touches on transparent PNGs

I have a PNG in a UIImageView with alpha around the edges (let's say a circle). When I tap it, I want it to register as a tap for the circle if I'm touching the opaque bit, but a tap for the view behind if I touch the transparent bit. (BTW: On another forum, someone said PNGs automatically do this, and a transparent PNG should pass the...

XCode won't build IB plugin into resources folder

I've created a custom control and a framework/IB plugin for it using the IB3 plugin template. According to the docs the plugin should be built right into the resources directory of the framework. When I build my project the plugin is in the configuration folder (Debug) along with the framework instead. This is the same behavior right ...

UIPickerView that scrolls horizontally on the iPhone?

Hi all, I'm taking a look at this widget, and it appears to be a UIPickerView, however I haven't seen anything provided by the iPhone SDK API that allows for horizontal scrolling only. Mostly it's all done vertically. Also there appears to be a custom graphic around this picker, so it might not be that either. I'm curious if anyone is ...

Some Architecture Questions about CLLocation Manager and Multiple ViewControllers

Hello, first of all, sorry if that question is dumb but I´m a total newbie in ObjC. In my iPhone Application, I have an CLLocationManager implementation in my one and only ViewController because I have only one View. No I want more Views in my Application and every View needs the Position Information from the CLLocationmanager. So, I ...

Why can't I @synthesize accessors in a category?

Obj-C 2.0 lets me declare properties in a category, but the compiler refuses to synthesize accessors inside the category. Why? (Sometimes it makes organization sense to put a bunch of related stuff in a category - even if the backing iVars go in the class declaration. I know about class extensions and how to do private properties, but t...

Can't run my app; “image not found” referring to bundled framework

Hello, I'm trying to include the Sparkle framework in my application. I don't really understand the specific steps necessary, and am now getting this error message: Dyld Error Message: Library not loaded: @loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle Referenced from: <..>/build/Debug/CoRay.app/Contents/MacOS/CoRay Reas...

Any good library for generating graphs for the iPhone?

I need a charting library that could work on the Iphone standalone (no Internet). I only need bars & pie. Is for a bussines-oriented app. If not exist, then how integrate a JS one? ...

Adding text labels to sliders in iPhone Settings application

When configuring a Settings.bundle as part of an iPhone application bundle, it's trivial to add minimum and maximum value images to sliders (PSSliderSpecifier), but not simple maximum and minimum text labels. http://developer.apple.com/iPhone/library/documentation/PreferenceSettings/Conceptual/SettingsApplicationSchemaReference/Articles...