objective-c

Implementing tabbar programatically.

Hi, I am new to iphone development. Following is the code,- (void)activateTab:(int)index { switch (index) { case 1: if (tab1ViewController == nil) { self.tab1ViewController =[[[CategoriesViewController alloc] initWithNibName:@"CategoriesViewController" bundle:[NSBundle main...

UI Acclerometer refrence

hi all, How can i use the UIAcclerometer class to compute the distance traveled by a person? ...

@synthesize with UITabBarController?

I am curious if there is a good reason I should / should not be using @synthesize for the tabBarController below, or does it not matter? @implementation ScramAppDelegate @synthesize window; @synthesize tabBarController; -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ...

How to add picture in UITableViewCell

I'm new to Iphone application development and objective C. I wonder if there is a way to insert a picture in a UITableViewCell - with or without creating a custom cell? I would like to have it positioned at the "second row" in the same way that "cell.detailTextLabel.text" appear. Any suggestions? Thanks in advance. ...

iPhone/iPad rotation

Hello guys! How can I detect the start of a rotation and the end of the rotation on these devices? EDIT: So after your answers, how can I detect the begining and ending of the orientation change. ...

NSLog(@"%@",super) crashing

I used NSLog(@"%@",super) in a method(any method) and it is crashing.... Why? How to print the super contents? Updated : currentclassname : superClassName { } and also if i use NSLog(@"%@", [super description]); It is printing "<currentclassname: 0x3db7230>" instead of superClassName... It is expected to print superClassName right. ...

Increase content size of UIWebView using Javascript

Hi folks, I have a translucent toolbar over the bottom of my UIWebView. The trouble is, if there is a link at the bottom of the page, I can't press it because the webview will always bounce back down to the bottom. I don't want to shrink the webview and use a solid colour toolbar, and UIWebViews interface doesn't open much up. What I...

Automatically returning to the application after dialing the number in iPhone

Hi All, I'm developing an iPhone re-dialer application in which a number is dialed and if the call is waiting then it will once again redial. But my application is exiting when number is dialed. I don't want that, it should automatically return. Can somebody help me in solving the problem? Thanks in Advance. ...

Objective C override %@ for custom objects

Hey there, I'd like to override the default print function in NSLog for custom objects; For example: MyObject *myObject = [[MyObject alloc] init]; NSLog(@"This is my object: %@", myObjcet); Will print out: This is my object: <MyObject: 0x4324234> Is there a function I override in MyObject to print out a prettier description? Ch...

image is not getting loaded in view.

I have created 2 views named "FirstView" and "SecondView". SecondView's nib file has an UIImage view object as its IBOutlet. Now I am getting an UIImage object from some FirstViewController's method. Now I am setting the SecondViewController's imageView property with that image and then I am pushing my SecondView Controller's object in N...

-(id)init using designated initialiser?

In the past I have always used method_1: but I have recently noticed a few instances where folks have instead called the superclasses designated initialiser. Does it matter, just curious if its more about style or substance? Method_1: -(id)init { self = [super init]; if(self) { //do things ... } return self; } ...

How can I use alerts like the volume alert in the iPhone in my apps?

Hi, What is the kind of alerts like the iPhone volume See picture: http://caius.name/images/ringer.jpg Thanks, ...

invoking a system call at remote system in an application running on my system

hiii all! I am working on an application which requires my iPhone to connect to mac via bluetooth and once connected my aplication will cause vnc aplication to run on the remote PC(mac). now that my iPhone is connected to mac.....via bluetooth.....i want to know as how can i make vnc run on tht mac expecting a quick reply...... thanks ...

Problem with Interface Builder and Xcode

Hi, From some reason, any time I connect IBOutlets or IBActions in Interface Builder, and build my app, the app crashes. In the Console Log I get this: Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key leftWebView.' How can ...

Create slideshow with photos from photoalbum on iPad

Hi, I want to create a little Slideshow App for iPad with images from iPads photoalbum. Is there a way to get all photos of photoalbum in an array or dictionary? Does someone has samplecode? Thanks for help!! ...

Why am I getting a EXC_BAD_ACCESS in a NSTimer selector?

I've got quite a weird problem. To make it short, i'll write some pseudo-code: init: create a dictionary and insert n elements. create a "repeat timer" and add it to the currentRunLoop using the timerRefresh selector. timerRefresh: using a list of keys, find the items in the dictionary if the item exists -> call a f...

iPhone: Use a view as a transparent overlay with closing button

I've got a map with three bar buttons for different markers to show up in the map. If I click on a bar button, the specific markers are shown in the map, which already works great. Now I would like to show a transparent overlay (popup window) with the description of the markers after I clicked on a bar button with a button to close the...

NSBundle loading a NSViewController

Hey all, I'm looking into a project that would upload custom NSBundles that include a NSViewController. In my main program I've got this code to deal with the bundle after it's been loaded... id principalClass = [loadedBundle principalClass]; id instance = [[principalClass alloc] init]; [localLabel setStringValue:[instance name]]; NSVi...

UIAccelerometer reference

Hi all, Can anybody suggest to me some good applications that make use of UIAccelerometer Class and some references too ? ...

Error with custom Class definition in protocol

I'm trying to set up a custom delegate protocol and am getting a strange error that I don't understand. I wonder if someone could point out what I'm doing wrong here (I'm still new to Ob-C and protocol use)... The situation is that I've built my own URLLoader class to manage loading and parsing data from the internet. I'm now trying to ...