objective-c

How do you set a button as highlighted on iPhone

How do you set an iPhone UIButton to the selected state, i.e. where it is blue highlighted? ...

How to capture the user click "Tabbar" item action?

I have a application with many views. For example, I have "A", "B", "C".... Both "A", "B" have a button to switch to "C". Also, I can click the tabbar "C" item to switch to "C". The question is, when I tab the tabbar to switch "C" is different from "B" and "A". For example, if I click the A view's button, it will switch to "C", and the...

I want to increase the brightness of half portion of image.

I'm a beginner .I want to get the half part of image. Actually I want to increase the the brighteness to half of the image using slider. I know how to brighten full image. by using this code -(UIImage *)colourize:(UIImage *)baseImage color:(UIColor *)theColor { UIGraphicsBeginImageContext(baseImage.size); CGContextRef ctx = UIGraphic...

How to create a TableView without a deletion control?

When a table view goes into editing mode, it shows the delete controls on the left, and also reordering controls on the right. I have no need for deleting the rows, hence I return UITableViewCellEditingStyleNone for -(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath. ...

Mach port messages in objective-c

Hello, I am trying to use Mach port messages in objective-c but I cannot find any documentation or working example. Do have this in stock? Thanks in advance for your help, Regards, ...

Symbol(s) not found. Collect2: Id returned 1 exit status

I received the following error: Undefined symbols: "_OBJC_CLASS_$_SurveyDelegate", referenced from: objc-class-ref-to-SurveyDelegate in Menus.o ld: symbol(s) not found collect2: ld returned 1 exit status The error was caused by removing SurveyDelegate and was fixed when I removed the code that tried to use a survery delegate. ...

Suicide: Objective-C objects calling their own -dealloc methods on themselves

Is it good practice for an object in Objective-C to commit suicide? That is, for an object to declare [self dealloc] where -dealloc permits an orderly wind down as usual? What are the principal risks? As it happens I have a specific example, a custom timer object that extends NSObject and comprises an NSTimer instance and an NSUInteger ...

Why I'm getting "Killed" responce while running a command in "usr/bin/" on my iPhone?

I've two iPhones for development and I made an executable binary (code signed by ldid as "ldid -S myBin") and placed it in the "usr/bin/" folder on both the iPhones. When I try to run that binary from "Mobile Terminal" (as root#myBi) I always get the "Killed" response. But on the second iPhone it runs without having any trouble. Can anyo...

3:rd party libraries in MonoTouch?

Is it possible to use 3:rd party libraries written in C# in MonoTouch? For example if I need to do image processing and need to make use of image processing library... Or rephrase the question: Can someone explain to me how 3:rd party libraries both written in obj-c or C# can be used with MonoTouch? BR //Christofffer ...

iPhone Web Application

Hi, I had a quick question regarding UIWebView. Is there anyway to programmatically navigate the UIWebView? Essentially, I prompt the user for certain information, such as (Current Location, Time). Using this information, I would like to fill out and complete a form on a webpage, and display the resulting UIWebView to the user. Is t...

get image form web service.

self.imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[dict objectForKey:@"img"]]]]; when i view images form web service through this code it will display images correctly. but when i scroll the cells in uitableview the images is again downloaded from web service. give an suggestion to show im...

Getting information about a class with NSLog

When I first started learning XCode I remember hearing something about how it has cool features to inspect an object and get information about its class. Now I need to use these cool features. How can I use NSLog to get class information about an object and other cool information about an object. ...

Using iPhone to measure the waist size of a person

Hi all. I want to create an application using which I can measure waist of any human being. But I am not able to identify how to perform such kind of thing. I may can use ACCELEROMETER but how to use it or else if any kind of another logic any one can suggest me so that I can create such kind of application. thanks in advance ...

UILocalNotification Problem

i have a local notification that I would like to fire every 5 minutes. I use: localNotif.repeatInterval=NSMinuteCalendarUnit that will have the notification happen once every minute. I can't figure out how to get this to happen every 5 minutes or whatever other >1 minutes interval. I've tried localNotif.repeatInterval=5*NSMinuteCalendarU...

jQuery and iPhone native app development.

How to use JqPlot (javascript ) charting libraries in a native application for iphone? ...

How to implement a modal date picker?

Hi All, I am using code from Ed Marty's answer for the question here but am having real trouble with a few bits. On the click of a button I have got the datepicker appearing, but the 'done' button however isn't. I am also getting an error from the line: [delegate datePickerController:controller didPickDate:datePicker.date]; Error m...

FlowCover - draw images onto the screen for the first time

Hi, I would like to know how to make the FlowCoverView be drawn when I want it to (after images are obtained). http://www.chaosinmotion.com/flowcover.m I have tried [FlowCoverView draw] but that gives me an error. Thanks ...

How to know the type of a variable in Objective C on Iphone?

For example if I have a function sort() like so: + (void) sort: (id) a { if(typeof(a) == 'NSArray') { ... } } So is there anything in Objective C for Iphone which can go in place of typeof() so that I can detect beforehand what kind of variable am I dealing with? ...

How to develop an iPhone app to work with the current iPhone's music library

Hi everyone, My friend (who knows nothing about programming what-so-ever) asked me if I could develop an iPhone application that lets the user select an artist from thier current synced artists on their iPhone music library, and display to them a list of concerts they will be playing in the near future. Maybe even use your current locat...

Doubt in C++ with respect to objective C

I can write a function this way in objective C. This can be used to churn out many UIButtons. +(UIButton*)getButton:(CGRect)frame{ UIButton *button=[UIButton buttonWithType:UIButtonTypeRoundedRect]; [button setTitle:@"Some title" forState:UIControlStateNormal]; button.frame=frame; return button; } Can the same be done in C++. I a...