objective-c

NSmutable array returns null in subviewcontroller: iphone objective C

Hi, I have a root view controller that I'm adding a subviewcontroller to. Rootviewcontroller: I'm trying to add a value from a dictionary as the sole member of the moviewController.list NSMutableArray. However its not getting added and the NSlog is telling me that the "list: (null)" for (id key in dictionary) { MovieController *m...

How do I run a system command in a cydget using objective c or javascript?

Hi! I am trying to run a Ruby script from a cydget (cydget is a framework made by Saurik for writing lockscreens on the iPhone, using cycript, which is a mix of javascript & objc - see http://www.cycript.org/ ) The script will first check to see if a WEBrick server is running, if so it will quietly exit, if not it will start the server...

Why I can support zooming a UIScrollView without conforming to the UIScrollViewDelegate?

To support zooming a image in a UIScrollView, I thought I have to conform the MyController to the UIScrollViewDelegate like as follows. But it works fine without conforming to the UIScrollViewDelegate, even though compiler generates a following warning message. warning: class 'MyController' does not implement the 'UIScrollViewDelegate' p...

NSURLConnection : Bad url problem

It seems that the NSURLConnection have problems with handling æ,ø,å. And the webservice I'm trying to connect to do not handle that I convert them to UTF8 chars. Any suggestions? ...

NSPredicate aggregate IN statement not working

I am a bit of a CoreData noob but am slowly getting my head around it. I am having trouble with the following code: NSArray * artisteIds = [@"1,2,3,4" componentsSeparatedByString:@","]; predicate = [NSPredicate predicateWithFormat:@"(artisteId IN %@)", artisteIds]; My Artiste managed object has a NSNumber field of artisteId and I hav...

How to move upwards from key board when selecting the text fields in the tabel view in both portrait and landscape?

I have 8 text fields in the table view. I need to enter the data into that text fields in both Portrait and Landscape mode. some text fields are back side of the Key board.I am unable to enter data into that text fields. I have done in portrait mode with help of willShowKeyBoard notification and working fine.But, Same thing i have appli...

Class method: is that the right way to avoid memory leakage?

Hello, First, I am new on this website, thus thank you in advance for your help. My iPhone app has a class whose main role is to encapsulate the way I treat data on a bunch of raw bytes coming from a web server. Each time I need to display a defined type of information from that data (e.g. a piece of advice contained within these raw b...

UIActivityIndicator in UITableViewCell not being displayed on "setSelected"

Hi There I've got a small problem that seems to haunt me. My UITableViewController Subclass loads Data in an asynchronous matter on Selection of a TableViewCell. like this... - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"clickROW"); itemData *selectedItemData;; selectedItemData...

How do I deal with asynchronous spaghetti code?

Hello! I am writing a simple application using the Facebook iPhone SDK. The Facebook code is mostly asynchronous, I start an operation and receive the response asynchronously in a delegate call: - (void) doSomething { [FBSomething startOperationWithDelegate:self]; } - (void) fbOperationFinished: (FBSomething*) operation {…} Quite...

Iphone: How to update a table view that displays managed objects when new object is added.

I have a table view that displays managed objects (Tasks). I'd like to fetch all tasks and update the table view once a task is added or modified. Currently refresh the tasks array when NSManagedObjectContextDidSaveNotification is fired. But I'm afraid that this could be quite inefficient as the table is also updated when other objects ...

Strange, Sudden compiler fail error in Xcode for iPhone dev

What is the following error caused by? I did not make any significant changes and suddenly it started appearing: Linking /Users/JimB/Desktop/iPhone Dev/Games4Kids/build/Debug-iphonesimulator/ETFanClub.app/Games4Kids(1 error) duplicate symbol .objc_category_nameNSString_HTTPExtensions in (path)ViewController3 and (path)ViewController1...

Xcode print symbol not found for my C function which used in Objective-C method body.

Xcode build prints this error . Undefined symbols: "EGViewportDimensionMake(unsigned int, unsigned int, unsigned int, unsigned int)", referenced from: -[Renderer render] in Renderer.o ld: symbol(s) not found collect2: ld returned 1 exit status I cannot figure out what's the problem. I'm not good at classic C syntax....

Resize an Image file?

I'm writing an iPhone app. I want a UIImagePicker control to come up when the app is launched. When the user selects an image, I want to resize that to being 512x512 with the original image just in the top-left. I then want to save it to a new file in my app's folder. How do I achieve this? ...

UITableView Custom Scrollbar

How can I create a custom scrollbar for a UITableView? I want to remove the default one that pops up when tracking begins and that disappears when tracking ends. I want, instead, to have one similar to that in a computer program: (a) it's on the right side of the screen and permanently visible; (b) manually scrolling the bar will scroll...

Objective-C: object init and memory management

Given the next code snippet: ... - (void) setTotalAmount: (NSNumber*)input { [totalAmount autorelease]; totalAmount = [input retain]; } - (void) dealloc { [totalAmount release]; [super dealloc]; } ... What I want to understand how really we set value. We allocate local (instance) var and "retain" to input var. But w...

Programming on iPhone - how ?

hi i have some question about programing on iphone what OS the iphone have ? what the language for programing on iphone ? what compiler i need ? is there Visual-studio tool for this ? (i'am C# programmer ) ? thank's in advance ...

How to conform to UITabBarControllerDelegate

I have a tabbar based application and do the following to get a reference to the application delegate: MyAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; Which then gives this warning: warning: type 'id <UIApplicationDelegate>' does not conform to the 'UITabBarControllerDelegate' My application delegate hea...

How do I pass a nil-terminted list of strings to an Objective-C function?

The function [NSArray arrayWithObjects:foo, bar, nil] passes a nil-terminted list of string to a function. If I want to write a similar function, what does the declaration look like, and how do I iterate through the strings? ...

Problem with my custom class and it's instances

Hello. I'm doing an app where user can click on a map and hear a different sound playing depending on the location clicked. I've got a point in polygon for this and it works perfectly. I've created audio playlist system also that queues audiofiles and plays them in order. This too works. However I'm trying to implement a method that chec...

How to access the instance variable of the view from its subview in iphone

I am new to iphone development.I want to to access the instance variable declared in uiview from its uiview subview.please help me out .Thanks. ...