objective-c

View hide problem

Hello, I am using a Xib (tab bar controller with navigation bar). when i use navigation bar in app delegate then Xib slides little bit bellow.Actually i want a navigation bar on enter page so it is compulsory to define navigation bar in app delegate. Please help me how i solve this problem. ...

asynchronous method executing

I have a delegate method with the following tasks: get something from the internet (ex: some image from a web site); process that image in a certain way; display the result in a subview ; getting the image takes some time, depending on the network's speed so the result of its processing is displayed in the subview after that little w...

Does Xcode have intellisense

I am just waiting for my MacBook to arrive - so at the moment just doing theory, but does Xcode have intellisense like Visual Studio? ...

String search in string array in objective c

Good Day! I want to search a specific string in the array of strings in objective c. Can somebody help me in this regard? Thanks ...

Asynchronous NSURLConnection Throws EXC_BAD_ACCESS

I'm not really sure why my code is throwing a EXC_BAD_ACCESS, I have followed the guidelines in Apple's documentation: -(void)getMessages:(NSString*)stream{ NSString* myURL = [NSString stringWithFormat:@"http://www.someurl.com"]; NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:myURL]]; NSURLCo...

Few iPhone noob questions

Why should I declare local variables as 'static' inside a method? Like: static NSString *cellIdentifier = @"Cell"; Is it a performance advantage? (I know what 'static' does; in C context) What does this syntax mean?[someObj release], someObj = nil; Two statements? Why should I assign nil again? Is not 'release' enough? Should I do it fo...

Extract Objective-C class information from library at runtime

I was wondering if there were a way to extract information from an objective-c app, static or dynamic library and/or framework? Information such as an array of class names without instantiating or running the target. I've checked google and the apple developer documentation and haven't found anything. Frank ...

How hard is it to go from C# and Visual Studio to Objective C and Xcode?

How hard is it to go from C# and Visual Studio to Objective C and Xcode? I am currently doing the Stanford iTunes course - any other suggestions? ...

Creating iPhoto albums using Cocoa Scripting Bridge

I'm tearing my hair out trying to create a new album from a Cocoa Application. In applescript it's a nice simple procedure: tell application "iPhoto" new album name "Album" end tell But I can't work out how this is done in Cocoa via the Scripting Bridge. I've tried this: iPhotoApplication *iPhoto = [SBApplication applicationWithB...

Using a Data Management Singleton

Here's my singleton code (pretty much boilerplate): @interface DataManager : NSObject { NSMutableArray *eventList; } @property (nonatomic, retain) NSMutableArray *eventList; +(DataManager*)sharedDataManager; @end And then the .m: #import "DataManager.h" static DataManager *singletonDataManager = nil; @implementation DataMana...

AVaudio Player Problem

Hello,I am using Avaudio player in our app.I play the song from list after playing when i back to list for selecting another song then fist one is also playing. I want to stop previous song and then play the other song. Please help me. ...

iPhone view architecture question

So I have (for instance) three views: A: root view B: a view functionally identical to root C: a data entry view which collects a few piece of info What I'm trying to do is reuse C to supply the data it collects to either A or B. It should supply the data to whichever of the two it is pushed onto. The data for A is similar, but functio...

Using NSThread to solve waiting for image from URL on the iPhone

So I have the following code in a method which I want to set a UIImageView image to that of one from an online source: [NSThread detachNewThreadSelector:@selector(loadImage) toTarget:self withObject:nil]; Then in the method called by the thread I have this: - (void) loadImage { NSURL *url = [NSURL URLWithString:logoPath]; // logo...

Selected UItableViewCell staying blue when selected

When I push a view after a user has selected a UITableView row, the row gets a blue highlight, and then the new view appears. That's fine. But when I go 'back' the row is still highlighted in blue. Here's my didSelectRowAtIndexPath code. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { Se...

Checking Dependencies Internal error occurred while creating dependency graph: ASSERTION FAILURE

hello i am getting this error i am using 3.1.2 please help me Checking Dependencies Internal error occurred while creating dependency graph: ASSERTION FAILURE in /SourceCache/DevToolsBase/DevToolsBase-1204/pbxcore/NativeBuildSystem/XCDependencyNode.m:396 Details: command should be an instance inheriting from XCDependencyCommand, but ...

Tips and Tricks to avoid iphone app crash

Is there any tips to avoid crashing of iPhone applications. Sometime it is very difficult to understand where the problem is. What are the possible reasons of iPhone app crashes ? ...

Core Data combined Query

Hey, i have question related to CoreData. My iphone project has 2 Entities, Organisation and Brand with a 1 to many "BrandsToOrg" relationship and inverse. So my project has a Mapview, where you can see all the Organisations and a little subview when you click on those Organisations.At the subview there is a "show Brands" Button, whic...

How to do edit-in-place in a UITableView?

Is there a standard way to set up a table to allow editing-in-place, kind of like this: http://www.gtp.com.au/gtpicommerce/images/iphone4.jpg I only need editable text at the moment, but I might need UISwitches or UISliders in the future. ...

UITableView programatically create delegate object?

I have a question regarding setting up a custom delegate class for use with UITableView. What I have done is as follows: Setup a new class (in sperate *.h and *.m files for the class) Conformed that new class to the <UITableViewDelegate, UITableViewDataSource> protocols Added the required methods. Created a pointer to the new object us...

Process for linking static ObjC libraries in XCode

I'm trying to link to a static library and I keep getting linker errors. I've found a few sites that post examples but I have not been able to see what I am doing wrong. First I create a project that will link to my lib add> existing files find my .xcodeproj file select "Copy items into destination groups folder"... Select my host proj...