objective-c

UITabBar(Controller) - Get index of tapped?

Hi all, I've got a tab bar application and I need to know when and what button a user taps on the tab bar as to display the appropriate notifications and such. In short: How would I go about detecting the index of a tapped UITabBarItem on a UITabBar? Thanks in advance! ...

Implement iphone MSAA using Unity build

I want to implement MSAA into the Unity build of a game. Currently I am using this code I got from the Unity forums and it compiles but I can clearly see that it is having no effect in game. Any help would be appreciated. bool msaaEnabled = false; CGSize globalSize; struct MyEAGLSurface { GLuint format; GLuint depth...

How to display time from UIDatePicker

I'm using a UIDatePicker in time mode to get the time. I'm trying to display the time selected in a label. The following code doesn't work NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; [outputFormatter setDateFormat:@"h:mm a"]; label.text = [outputFormatter stringFromDate:self.datePicker.date]; [outputFormatter re...

Removing mkoverlay from map

i added overlay (MKOverlay) with custom drawings to the Mapview. The overlay showing fine and i can see the drawings. But when i remove that overlay its not removing perfectly some part of the drawing is still there. What is the reason? im using removeOverlay: for removing that overlay. Any help is appreciated.. ...

Using Google Reader API and OAuth in iPhone app

I want to make an app that uses on the Google Reader API. But I'm finding out that there isn't an offical API for it - is there a problem using the unofficial API, in terms of App Store guidelines/approval? Would other apps (Reeder, etc) use this? Also what is the best method for logging in? Is OAuth the preffered method? Is using Janra...

What is this piece of objective-c doing?

I'm not really sure what this is doing. Is dateFormatter only settable the first time? static NSDateFormatter *dateFormatter = nil; if (dateFormatter == nil) { dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setTimeStyle:NSDateFormatterMediumStyle]; [dateFormatter setDateStyle:NSDateFormatterMediumStyle]; } ...

APP that pick image when you are in Offline,uoloads when re-enters network area

Hi can any one help i am developing a app that can even take advantage of Picup Images when the iPhone is offline. Uploads are stored in a queue and the user can re-enter into online or network area then it will uploads the image to SQL server Could you please refer any link or document... thanx in Advance... ...

How to make a view appear translucent

I'm using this to bring up a new view [self presentModalViewController:secondViewController animated:YES]; This completely covers the original view. Is there a way to make the second view translucent so that parts of the original view can still be seen? Can it be done in Interface Builder? ...

save videos in iphone simulator & upload it to the web services

hi Friends i just want to know that how i can save the videos to the iphone simulator & how i can upload it to the web services. Anks ...

Display images in both portait and landscape mode

I currently have a fairly straight forward UI which displays three 250 x 180 images in UIImageView's but I want to be able to show them in a more interesting way and also when the ipad is rotated to landscape mode the images overlap the text etc. It just looks a bit cheap. What are my options for displaying this three images more creat...

how to remove a particular sign from a string ?

i have a string gpbusd~buy~~~~update~HIT 40 PIPS~HIT 110 PIPS~~gpbusd~buy~~~BREAK EVEN~update~HIT~100+~~gpbusd~buy~1.5500/25~1.5455~~new~40~100+~~gpbusd~buy~~~~update~CLOSE 0 TO 10 PIPS N~~~gpbusd~buy~1.5335/50~1.5320~~new~40~80+~~gpbusd~buy~~~~update~~15-20 PIPS CLOSE~KEEP OPEN~gpbusd~buy~1.5530/50~~1.5505~update~HIT~80~KEEP OPEN~gpbu...

iPhone navigationController is not displayed

Hi all I have a very strange behaviour of my navigation view. What I want is, that from my main view, the user can touch a button, which leads him to the view with the application settings. Here is the code, responsible for the navigation: AppDelegate.h @interface AppDelegate : NSObject { UIWindow *window; ViewController...

Pre-processor directive to detect iPad

Hello I declare some constants in a header file which need to be different depending on whether it is an iPad or an iPhone app. How would I do this? i.e #ifdef ISIPAD static NSString myconst = @"ipad!"; #else static NSString myconst = @"iphone!"; #endif ...

NSCalendar crashing app

Hi, I'm initializing a NSCalendar in viewDidLoad like this: gregorian = [NSCalendar currentCalendar]; The calendar is declared in the corresponding .h file like this: NSCalendar *gregorian; When accessing the calendar from a method my app crashes: - (void)someMethod{ unsigned int unitFlags; unitFlags = NSHourCalendarUnit | NS...

Rotating a UIImageView around a point over 10 seconds?

I have a UIImageView setup called needleImageView which i need to rotate 360degrees over 10 seconds the point 20.00 20.00 of the ImageView. Anybody able to show me sample code for this functionality? Thanks, -Code ...

Making chat server (Chat server's .NET service and Chat client's iOS applications) with Window service or WCF

I want to build a chat server but i don't know i should use Window service or WCF? Numbers of client of my chat service not a lot, it's about 30 to 40 (Exactly, it's not a chat server, it just a server use to send/recieve data to/from client in local network). Should i use Window service or WCF? ...

iphone: memory effciency in cocos2d 0.82 VS cocos2d 0.99.4

HI, I have a game built using cocos0.82. i want to know that will there be a significant memory efficiency if i upgrade my cocos2d to latest version ? Please reply. ...

iphone: in-App Purchase Error

Hi, I am developing an application and using in-app purchases in it. i have created in-app products in iTunes Connect. till yesterday everything was working fine. but today. it started giving this error. "Error: Payment requests are restricted to products returned as valid via Store Kit's didRecieveResponse method." i have no idea wha...

ASIHTTPRequest: Basic Authentication with Base64 encoding?

Does ASIHTTPRequest uses Base64 encoding for username and password? On the webpage I only found out that the username/password is in plain text if SSL is not used. ...

UIWebview memory problem

Hi, In my App I have a large memory issue I add UIScrollview with a viewController views dynamically when I need and I properly remove the viewController while scrolling. and in that viewController I placed a UIWebiew in IBOutlet and load webview as [m_objWebView loadRequest:[NSURLRequest requestWithURL: [NSURL URLWit...