objective-c

NSDocument vs sqlite records

I'm developing a cocoa application that could be used to manage customer and employee details in a small business. When I read through the NSDocument architecture, I believe that the document/window management and workflow it gives you is excellent, however I am trying to figure out how that architecture fits into (if at all) an appli...

How to remove (pop) a view from OTHER view?

Hi, I have 2 views. One is the 'viewheader' and the other is the 'viewContent' (added as subview). 'viewContent' contains a TableView (based on UINavigationController) and the TableView can drill down to a DetailView (UIViewController). (see Image below) My Question is: How can I remove (pop) the DetailView, with a UIButton FROM the '...

List of Bluetooth devices on iPhone

Hello people! I'm develop iphone app, what need connect to bluetooth device and handle disconnection of device. I'm tryied to use ExternalAccessory framework, but it don't show any device (in settings I have paired A2DP device), on apple site I see " Specifically, you must include the UISupportedExternalAccessoryProtocols key to declar...

how to solve sorting problem

Hi I am new to iPhone. What I am doing is sorting the array of images; that array consists of 22 elements. I am writing the code for that: NSMutableArray *images2 = [[NSMutableArray alloc] initWithArray:images] int n=22; for (int i=0;i<n;i++){ for (int j=1;j<n-i;j++){ if(count[j-1]>count[j]){ int t = count[j-1] ...

To retrieve contact stored in facebook

Hii all, I just wanted to know how do I retrieve ones contacts from his facebook account in iphone programmatically. ...

Public key encryption in objective-C/iPhone

I have a .net desktop application which calls SOAP services. The SOAP request sends some data encrypted with .net 'RSACryptoServiceProvider' library. I have the public key for encryption. I am trying to port this application into iPhone, which requires me to do the public key encryption in objective-c/iPhone. Can anyone please point m...

Placing calls to super?

I have asked this before, but the more I look at other code examples the more I see differences in layout. Usually I try and put the call to super at the start (if its a creation type method) or at the end (if its a destroy type method) (see below...) -(void)viewDidLoad { [super viewDidLoad]; ... ... } . -(void)viewDidUnload...

Avoiding making a UIButton transparent/see-through when disabling it

I want to disable my UIButton, so I call: button.enabled = FALSE; However this makes the button see-through and I can see the elements underneath it. I don't mind that it changes colour, I just don't want it to be see-through. I've tried ticking the boxes for 'opaque' and 'clip subviews' in IB, but no joy. Is there an easy way to ...

Load/unload new views in Objective-C

Hi, I am currently testing this environment and would like to ask about the best strategy loading/unloading for a multiview application. The app i am playing around with should have the following: Main: a normal view with 5 x buttons (Play, Leaderboard, Properties, Instructions and an "i" button for about) The Properties is a tableVie...

Calling singleton object initiated from nib.

Hi, I have an object which is initiated in my nib file. I want it to be a singleton but also accessible from code through [myClass sharedInstance];. Right now I have this: static myClass *singleton = nil; @implementation myClass + (myClass *)sharedInstance { if (!singleton) singleton = [[self class] new]; return singleton; } ...

Toggle two UISwitch

Hi, I have two UISwitch....and i need to turn off the first one when the second one is turn on and also turn on the first one when the second one is off.... similarly when first is on second will go off and vice varca... any idea?? ...

Center Align text in UITableViewCell problem

Hi, I'm kinda new to Objective-C and iPhone development and I've come across a problem when trying to center the text in a table cell. I've searched google but the solutions are for an old SDK bug that has been fixed and these don't work for me. Some code: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:...

image downloading from URL in iPhone application

Hi All, I am using google chart functionality in iPhone app....I want to download image and put it into UIImageView from http://chart.apis.google.com/chart?cht=p3&amp;chd=t:60,40&amp;chs=250x100&amp;chl=Hello|World ... Is there any sample app for doing such functionality?or any other way to display charts in app? Thanks in advance... ...

Memory Management

Hi all, I need a clarification from all of you,That is I am implementing an iPad application. In that I tried to download and animate the images. The image count should be more than 100,000.The code I used to download and adding to the view is as follows. UIImageView* imageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0,100,100)...

Adding data to an NSDictionary... SRSLY? Isn't there a quicker way?

I'm from a Flash ActionScript background. Where I'm from, I can set a dictionary-like object like this: var data:Object = {startPoint:5, endPoint:12}; So coming to Objective-C, I was surprised to discover that the equivalent to this appears to be: NSMutableDictionary *data = [NSMutableDictionary dictionary]; [data setObject:[NSNumber...

Regarding ePub uploading???

Hi All, One of my clients wants a functionality to sync his ebook reader app of iphone with iTunes Store or App Store for downloading epubs or ebooks and want to put his epub and ebooks at itunes store or app store.He do not want maintain a server for this purpose. Is it possible to upload epubs or ebooks on iTunes Store or App store??...

How to set the audio files from my app as a ringtone to my Iphone?

Hi Guys, I am struggling with a problem that In my application Im having audio files and I need to set those audio files as Ringtone, Alarm, Email alert or Message tone.As I am new to Sdk I dont know how to do this. Pleas guys can any one suggest how to get rid of this? Hope I will get the quick response from your side guys. Thanks i...

Objective C: How do i find out if a number is divisible by another number?

Hello. In objective c (Mac development). How can i find out if a number is divisible by another number and not a decimal? ...

NSCoding with as NSString inside a object

My issue is then i retrive my NSArray of Store objects, all my NSString properties are giving me BadAccess errors. The int and double works fine! store.h @interface Store : NSObject<NSCoding> { NSString *Name; NSString *Address; NSString *Phone; double GeoLong; double GeoLat; int ID; } @property (nona...

How to show/hide different windows using obj-c in xcode.

Hi, I' wondering how I would go about having two windows in interface builder and then being able to show and/or hide either of them from xcode with objective-c? Any ideas? Thanks ...