objective-c

iPhone App Startup Screen

yet another basic question ... I have an app that takes about 4-5 secs to load. I want to use the time and show a startup screen that is visible at least for 4 seconds, and shows until the app is loaded and ready to show How can I build that into my app? ...

Objective-C / C giving enums default values

I read somewhere about giving enums default values like so: typedef enum { MarketNavigationTypeNone = 0, MarketNavigationTypeHeirachy = 1, MarketNavigationTypeMarket = 2 } MarketNavigationLevelType; .. but i can't remember the value of doing this. If i don't give them default values - and then someone later on reorders the enum - wha...

Simple way to check google username and password in iphone app

What is the simple way to check google username and password whether it is correct in iphone app? ...

Why manual memory management?

Are there any plans for auto memory management? What are the advantanges of manually managing memory...does it conserve memory in the long run? I have noticed in .Net Windows Applications - they are very sluggish - is this partly due to the garbage collector not working correctly? ...

Is there anything "objective" about C# 4.0, or ruby-like?

This is a very "high-level" question. I'm looking for insight into this problem that c# has. It has so many features that it supports almost ANY task, alas there are alternatives that are better suited for some tasks. With the advent of MVC(old news) + ruby, people are starting to have "fun" AND getting things to work. C# seems like a...

Find the Last Accessed Date of a File in Cocoa

Is it possible to get file/folder last accessed date in mac using cocoa? struct stat output; //int ret = stat([[[openPanel filenames] lastObject] UTF8String], &output); int ret = stat([[[openPanel filenames] lastObject] fileSystemRepresentation], &output); // error handling omitted for this example struct timespec ac...

NSString - how to check if it contains quotation marks <">

[[somestring substringtoindex:0] is equaltostring:@"""]; 'makes red' the rest of the code. actually i can't put quotation marks inside quotation marks. still, this is the character i want to reffer. how should I do it in the correct way? thanks ...

Avaudioplayer problem regarding song overlaping

The problem is in being able to catch the instance of the player to control it i.e. Stop it, Play it etc. The code by default creates multiple instances of the same player and overlaps the songs. I am being unable to reference the player specifically. Do you have an idea as to how we can do so? Thanks, Arun ...

problem with presentModalViewController

If my iPad is in Landscape mode and presentModalViewController is called the view automatically turns into portrait mode. Any solutions? UIViewController * start = [[UIViewController alloc]initWithNibName:@"SecondView" bundle:nil]; start.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; start.modalPresentationStyle = UIModalP...

Does Objective-C have a Standard Library?

Most somewhat modern programming languages have a standard library? It is my impression is that there isn't a decent sized standard library for Obj-C , rather that it relies mostly/all on Cocoa and that (plus people not wanting to use GNUstep) is why Obj-C is only used on macs)? Is this true/to what extent? Are there any standard obj-c...

Get objc_exception_throw when setting cookie with ASIHTTPRequest

I got objc_exception_throw when trying to set cookies for a ASIHTTPRequest request. I tried both of these but it didn't work out. ASIHTTPRequest *request = [[ASIHTTPRequest alloc] initWithURL:url]; NSMutableDictionary *properties = [[NSMutableDictionary alloc] init]; [properties setValue:@".google.com" forKey:@"Domain"]; [properties ...

iphone development

Hi I want to play pls file from iphone application. The url for that is "http://yp.shoutcast.com/sbin/tunein-station.pls?id=4512", Please help me how can I play this file from iphone application. Thanks in advance. ...

Is there a way to fix the background image of a UITableView

Hi I have set the background of my UITable with a custom image. self.tableView.backgroundColor = [UIColor clearColor]; self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"background.png"]]; The problem I'm having is the background image is scrolling and doesn't look good at the top and bottom of the ...

initializer not constant?

Quick question if I may: I am just curious about the following (see below) Xcode says "initializer element is not constant" why this does not work, I guess its the NSArray ... static NSArray *stuffyNames = [NSArray arrayWithObjects:@"Ted",@"Dog",@"Snosa",nil]; and this does ... static NSString *stuffyNames[3] = {@"Ted",@"Dog",@"Snosa...

iPhone/iPad Pan, Pinch and Rotate a view simultaneously

I'm trying to recreate the behaviour of the photos app, where you can pan, pinch and rotate simultaneously. I have the basics working, but I'm stuck on something. For the pan, I offset the centrepoint of the view by the translation amount. This is working well. For the pinch and rotate I'm applying an affine transform to the view. This...

How to get a reference to a method's caller object from within the method in Objective-C

Hi guys. I have a few text fields and text views on my application's view. The keyboard comes up when I click in anyone of them. I have a method that gets called when any one of these objects is tapped in. However, I would like the method to execute its code only if the a certain Text Field(s) or a certain Text View(s) is tapped in. I wo...

How do I resize my view in horizontal orientation?

In portrait orientation my view is 744px in height. I want to change this height when it is in landscape view. How can I do this? ...

How to collapse all methods in XCode?

Hi! This is simple: Does anybody knows how to collapse all methods in a class in XCode? Collapsing one by one is not an option anymore =D Thanks and have a nice day! ...

How to make a horizontal UI table view on iPhone?

Normally, the UITableView is something like this: [ cell 1 ] [ cell 2 ] [ cell 3 ] [ cell 4 ] But I want to make my own UITableView like this: | | | | | c | c | c | | e | e | e | | l | l | l | | l | l | l | | | | | | 1 | 2 | 3 | | | | | And I want the use...

CoreData RelationShips

Working environment: OS X 10.6.3, Xcode 3.2.1 Hi! I'm working on a project called Rent-a-Flick. The project has two entities: Movie and Client. Between them there's a many-to-many relationship. I have 2 tables: one with the movies and one with the clients. Their content is bound to the proper array controllers(for movie and client). I...