objective-c

NSString retain copy question

Hi, I've seen a few posts on here about the issue of using retain or copy for strings. I still can't quite get my head around the difference or the importance. In my case at the moment I have a class with a whole load of nsstrings to hold strings. I want this class to only be instantiated once and I want its nsstring variables to chan...

how can i change the navigation bar of MFMailComposeViewController ?

i want to change the navigation bar of MFMailComposeViewController to black color. how can i change. ...

Lazy UIPickerView - (it won't move twice)

Hello everybody, And thank you in advance for your attention. I am trying to achieve a little animation effect in my simple application, using this time an UIPickerView object. Basically, when a certain event occurs, I wish my picker view to animate itself selecting its last row (with animation, of course) and immediately after (without...

Debugging Core Data managed objects with predicates

My application has the data models a little bit complicated. I need to debug a fetch request with different predicates. Is there any fast way to see different results for different predicates? I am tired with changing only one predicate and I have to start again my navigation application with nearly 10 steps before. An example of these...

Looking for example GUI applications written in Python for the iPhone.

Hey! I have a little script I wrote in python and it actually works on the iPhone via the terminal. I am looking for code snippets or documentation for the GUI writing for the iPhone - Actually what I need is to implement an input and some output. nothing fancy - for now. I have found this page: http://www.saurik.com/id/5 but as i und...

setValue:forKey: operation?

I am curious what is happening with setValue:forKey: in the code snippet below: is it just setting the pointer to point to each array, similar to ... [self setMyArray_1: animalArray]; [self setMyArray_2: animalArray]; [self setMyArray_3: animalArray]; Also: does setValue:forKey retain the array? I am guessing it does (as the above wou...

how to collect the data from database in array and then put that data for each row of table view in objective-c

i want to collect the data from database in the array and then after put that in each cell of the table view. i dont know how to retrieve the data in array for select * from tablename for single row. ...

Centering UITableViewCell subviews when row heights vary in a UITableView

I am using a slightly larger backgroundView image for the last row of my table. When the last cell is displayed, the imageView, textLabel, and accessoryView are all maintaining the same margin from the bottom of the cell, rather than maintaining their position in the center of the cell like they do on the other rows of smaller height. T...

Existing Objective-C library for dealing with human readability (and based on Cocoa's Foundation framework) ?

Is there an existing Objective-C library for dealing with human readability of object counts, file sizes, dates, time durations and so on? (and based on Cocoa's Foundation framework?) In other words, given an NSDate, NSNumber, NSTimeInterval etc. or an NSArray of objects; is there a library for constructing a string representation that ...

How to get the url which the browser is current visiting?

I want to implement a tiny app that can save the current url opening in the browser to delicious. So the first thing to do is get the url. So what function/class can we use to get the curl in the browser? ...

reading excel sheet with url in Iphone sdk

Hi Guys, I am Having a problem here.I am downloading the excel sheet using Url and have to displaying it in the web view here my problem is the Excel sheet is not displaying. I written the code as: NSString *str = @""; str = [str stringByAppendingString: @"http://databases.about.com/library/samples/address.xls"]; NS...

Loading presentModalViewController in ViewDidAppear causes EXC_BAD_ACCESS

In the Follwoing ViewControllerClass I get EXC_BAD_ACCESS when trying to call presentModalViewController in ViewDidAppear method. #import "SounderViewController.h" #import "ASIFormDataRequest.h" #import "ASIHTTPRequest.h" #import "JSON.h" #import "InfoViewController.h" @implementation SounderViewController @synthesize ipod; @synthes...

iPhone application exit Question

I have an iPhone application which will exit on it's own after a user completes a particular action. I currently use exit(0) to leave the application and I have had no troubles with it until recently. I understand that this isn't the "right" way to exit an application but it is something that I want to do. The issue I am having is whe...

Printing the Data in a NSTableView.

How would print what is in my NSTableView? The View uses core data so everything is stored and can be grabbed as an NSArray. But how would I go about printing it out? At the moment when you click the print button it just seems to take a picture of the view and print that. ...

Objetive-c async http request

I want to create an async http request. Where to start? Can you give me some good links to start this? I want to learn it. ...

@selector - With Multiple Arguments?

I have been using @selector today for the first time and have not been able to work out how to do the following? How would you write the @selector if you had more than one argument? NO ARGUMENTS: -(void)printText { NSLog(@"Fish"); } [self performSelector:@selector(printText) withObject:nil afterDelay:0.25]; SINGLE ARGUMENT: -(v...

Writing asynchronously on a stream in cocoa

Hi folks I have been trying to find any way for writing asynchronously on a stream in Cocoa. I have a set of events in my applications which will try to send data through the socket but i can't be blocked during this transmission due to design terms. I have tried setting a delegate on the output stream and check the event NSStreamEven...

how does dot syntax work in objective c

Hey, I'm trying to figure out if I can use dot syntax in objective c in order to access class variables. For example if I have a class named ClassA of type NSObject. ClassA has an instance of a class named ClassB also of type NSObject. And ClassB has a variable named myString of type NSString; In a view controller that has an inst...

maximal acceleration of UIAccelerometer

Hi, i want to track how fast my iPhone is moved. i checked the AceelerometerGraph Example App, where the maximum Amount was about 2.0 (in this app) i want to know how exactly i can track the speed of my moving iphone. in this example app the maximum amount is reached very fast. Is there a way to get better results ? Sry for my bad en...

Is Objective-C used without Cocoa?

It seems that Cocoa seems to be the main platform for Objective-C. GCC (which Xcode uses) supports Objective-C so it must be available on a wide range of platforms. Are there any notable cross-platform projects that use Objective-C but not Cocoa (or its open source cousin GNUStep)? Is it really used outside the Apple ecosystem? ...