objective-c

Why not use Interface Builder

I have seen some people who refuse to use Interface Builder and prefer to make everything using code. Isn't this a bit tedious and doesn't it take longer? Why would people do that? ...

GHUnit for Integration Testing iOS Network functions

I have an iOS application (but this is just as applicable to an OS X app) that has async network access functions. Using GHUnit and without manually doing inner run loops, or synchronization of async operations, is it possible have a test method run an async operation and verify the results AFTER the async operation is complete. I don'...

how to keep control of my root view while loading a view controller as a subview?

I have a root view which contains a table and a button. When I press the button a view is loaded on top of the root view but keeps my root view visible. The view that appears after the button is pressed is suppose to act as a menu that is scrollable. My problem is that when I want to close the menu that appears. Im using the [self.view ...

Capture key press events while NSMenu is open

Hi, I'm interested in capturing key presses while a NSMenu is open. For example, if the menu is open and the user presses "e", or "1" on the keyboard, send a particular message (preferably passing an event object which contains reference to which key was pressed). I've looked into alternate menus, but I'm under the impression that can ...

Cocoa way to represent data for iphone dev

I come from heavy web application dev background, and having some problems representing my related data structures the right way in iPhone dev (the 'Model' part of MVC). Lets say I have a data structure which is best represented via JSON like this: { "Beethoven": { "description": "Another great composer", "pictures...

Using an NSObject to control onscreen elements

I'm using a UIViewController with some buttons, labels, etc which I need to change attributes of depending on the situation. I'm looking to create an NSObject to control these elements based on an int in the View Controller. When a button is pressed the NSObject will deallocate, the int will change and the NSObject will re-instantiat...

How are people accomplishing photo filters in iPhoneOS?

What are people using/doing to create photo filters or photoshop like effects on iPhone OS? Things like B&W, sepia, cross-processing, 'vintage' etc. I see ImageMagick can probably do this with a lot of futzing around, any other options? ...

How to display multiple lines in a tableView cell

I have a somewhat long string that gets truncated when displayed in a tablView cell. I did this to make the table view wider: tableView.rowHeight = 100; How can I make the font smaller as well as wrap the text in the table view cell? ...

UITableView Plist Not Returning valueForKey

I'm stuck in a rut over implementing a sectioned plist into a UITableView. My plist setup is as followed. I have a root array with dictionaries representing sections. These dictionaries have a single string 'sectionname' that dictates the section header as well as an array of dictionaries inside to represent the cells (the reason for th...

Pass object pointer in drag/drop operation

Is it possible to pass the pointer to an object in a drag and drop operation? Here is the scenario... I have an 'NSArray' of custom objects. For arguments sake we'll say this is a list of person objects. The list is tied to an NSTableView via an NSArrayController. The NSTableView is a drag source and I have an NSView as a drag destina...

NSData to Java String

Hello all, I've been writing a Web Application recently that interacts with iPhones. The iPhone iphone will actually send information to the server in the form of a plist. So it's not uncommon to see something like... <key>RandomData</key> <data>UW31vrxbUTl07PaDRDEln3EWTLojFFmsm7YuRAscirI=</data> Now I know this data is hashed/encryp...

Question about UIimagepickerController

HI all, I use the built-in camera of the Iphone in my apps dans I have two questions. UIImagePickerController *ipc = [[UIImagePickerController alloc] init]; ipc.sourceType = UIImagePickerControllerSourceTypeCamera; ipc.delegate = self; ipc.allowsEditing = NO; [self presentModalViewController:ipc animated:YES]; First, my camera let...

Expected expression before ')' token

Hello! I'm having problems with a program I'm trying to make in Objective-C. I have a method that I'm trying in my MainViewController.m that is as follows. - (void)updateLabels:(NSString *)text :(BOOL)isOn; { [self setNameLabel:(text *); if (isOn) [self setOnLabel:(ON *); else [self setOnLabel:(OFF *); } My goal should be obvi...

multiple objects for a single index in an NSArray

Is it possible to store multiple objects for a single index in an NSArray? ...

Why does fabs return integer?

When I do the following, the output is an integer value: double myvar = fabs(-5.01); NSLog(@"%.f", myvar); Should it be 5.01? ...

Implementing delegate methods, but still getting a warning?

Hi all, I'm getting a peculiar warning, specifically this one: warning: class does not implement the 'UIWebViewDelegate' protocol ... when I have these methods in my application: -(void)webViewDidStartLoad { ... } -(void)webViewDidFinishLoad { ... } ... and even after setting the UIWebView's delegate to self, I still get ...

Enumerate NSDictionary with keys and objects, PHP style

I know you can Enumerate the keys or values of NSMutableDictionary using NSEnumerator. Is it possible to do both together? I'm looking for something similar to the PHP foreach enumerator like: foreach ($dictionary as $key => $value); ...

hi i have included JSON framework in my xcode project in os 4. getting Strange warning.

hi i have included JSON framework in my xcode project in os 4. getting Strange warning. ld: warning: directory '-ObjC' following -L not found ld: warning: directory '-ljson' following -L not found ...

how to open an https site in iphone app?

i tried using startTLS method.but didn't obtain the result. ...

iPhone App runnung in the background terminates after 10 minutes

Hi, I am working on an app that needs to run in the background on iOS4. I want it to be a like regular Location-based app so the BackgroundMode is set to location. The application works well when it enters the background state but after 10 minutes, it stops responding anymore. Perhaps it gets suspended/terminated. What I want to do i...