objective-c

iphone sdk:how to convert arabic date format to english?

Hello, I am working on an application in which i save Current Date in database but when my app runs in Arabic language the current date format is changed into Arabic.I mean the date format should be like this 09/02/2010 but the digits are converted to Arabic digits.So how do i convert them back to english digits even if my app running in...

Label and LabelAtlas comparison? LabelAtlas is hard to use

Hi everyone I have some confusion about how to use AtlasLabel. It seems Label consume a lot memory than LabelAtlas? Such as if I create 100 line of text. Each of them is created by Label, then will it consume more memory than 100 line of text created by LabelAtlas? Label *label1 = [[Label alloc] initWithString:@"text1" dimensions:CGSi...

Changing the volume of a QTMovie playing an mp3

Hello, I'm using a QTMovie to play audio tracks. I've just started playing around with the volume controls and I'm changing the volume using setVolume:(float)newVolume. The problem I'm having is that the volume change seems very very miniscule. I have tried varying the volume between 0 and 10 and 0 and 128 (the maximum) and the differen...

How to sort the row contents on table cell by using date

Hi i am new to iphone application development.i am developing RSS feed Reader it has number of different RSS feeds. In my application (XML parsing), i want to display the content of the row on cell for particular date and with their corresponding title, description (in my application, i am using three labels for displaying title, da...

How to Access String Variable in One View Controller to Another view Controller

Hi, I am new to iphone development, Now i want to access the string variable in all the view controller, but i know to declare the variables in delegate method, but i cant access it, please help me out. Mainviewcontroller-->Viewcontroller1_-->viewcontroller2-->viewcontroller3-->subwebview. i have created one main view controller and t...

How to release objects in MasterViewController.

Hi guys, Here Im having a doubt that I am having an MasterViewController which doesnot have Superview and I am having labels which was declared globally and also used in different functions. My question is how can I release those labels which are allocated.if I use autorelease then it generating exceptions. - (id)init { if(self ...

Launch iPhone app from link in email

Hi, I've been trying out the URL schemes in the iPhone SDK and I have got my application to launch using a custom URL scheme like "myap://Dosomething" but that is not really practical for what I want. Is it possible to register a scheme somehow that would allow links in emails like "http://www.mydomain.com/" to launch my application, li...

How to set the object context in another class using Objective-C??

Hi, I have a main class and three other classes, now i need to give the reference of the other three objects that is created in their own classes to the main class object.How to do it ? ...

How add a default value to an array when child element is not found in xml parsing?

I am new to iphone development.I am parsing an XML page and displaying the content in a tableview.In some block in the XML page , the child element is missing , i want to add a value o in my array, when the child element is not fond in the particular block.My XML file is like <entry> <id>xxx </id> <title>xxxxx</title> <gd:ratings n...

Does the performance of saving a ManagedObjectContext depend on the number of contained (unchanged) objects?

A general CoreData/SQLite question Is there a significant difference between these two scenarios when saving a NSManagedObjectContext using an SQLite store: After adding/changing/deleting one object in a NSManagedObjectContext containing 10 otherwise unchanged NSManagedObjects After adding/changing/deleting one object in a NSManagedOb...

Why my NSDate Formatter can't convert correctly and returns null on device?

I have an NSDate Formatter that should create an NSDate from string and should return it formated. The problem is that the result of converting from String to NSDate is wrong, the bigger problem is that on iPhone OS 3.1.2 it returns null while in the simulator it returns a wrong date. //start formating date NSMutableString *rawNewsDate ...

How to release the memory in Master View Controller(First View Controller) in the application?

While we returning back to the 2nd view controller to main view controller, The Dealloc method is called and all the allocated memory is released of that view controller that is 2nd view controller. Then when will the dealloc method is called of Master View Controller that is First view contoller. ...

[Obj-C] Mac Screensaver with WebView crashes

Hy everybody, I have a screensaver made with obj-c and cocoa. Everything works fine under OsX 10.6.2 except the following. Within my screensaver I have a WebView with some application running. When I try to call my objective-c app (the screensaver) via javascript, I get an error and the screensaver and the system preferences panel crash...

UISearchBar Scope Button Color / Formatting

Hi there Simple and short: How do I change the color / textcolor / font etc. of a "Scope Button"? Is there a way at all or do i have to re-implement the whole thing all by myself? thanks in advance sam ...

Multiple statements in a loop with if else

EDIT: Updated code to better reflect my problem this code returns 9 strings to badDestination1 NSMutableArray* goodDestination1 = [NSMutableArray array]; NSMutableArray* badDestination1 = [NSMutableArray array]; NSMutableArray* badDestination2 = [NSMutableArray array]; for (NSString* item in sourceArray) { if ([item rangeOfString:...

iPhone SOAP Web Services - Sample code on how to use the parsed code from wsdl2objc?

Hello, Is there any other documentation available at wsdl2objc besides the Usage Instructions?. The documentation is very limited, it may be because I have never used a wsdl parser before, in that case does anyone have any recommending reading for this?. If someone could please provide some sample code or link to a tutorial, on how to ...

Accessing collection through KVC (to protect collection and be KVO compliant)

I have a class Test which has an array of Foos. I want to provide access to the Foos without exposing the ivar directly. I'm trying to make this KVC compliant (also to pave the way for KVO compliance). I have: Test.h @interface Test : NSObject { NSMutableArray *foos; } @property (readonly, copy) NSMutableArray *foos; @end Test....

Getting a Cocoa/Objective-C callback from Google Maps with WebView

Hi, all. I'm working on a new feature for my Mac application and it has to do with maps. As an example, let's use iPhoto's "Places". iPhoto uses Google Maps to show the location of various photos with red pins. Now when I click onto one of those pins, the application itself - iPhoto - reacts to that click, not the WebView / the map. So...

variable out of scope between view controllers

Hi, I am working on a navigation based iphone application. I have some information I want to pass on when I push a new view controller on the stack, say myObject. So: aViewController *vc = [[aViewController alloc] initwith....]; vc.object = myObject //myObject is defined in the current view controller [self.navigationController pushView...

Simple array loop question Objective-C

How can you make this work? numbers = [[NSMutableArray alloc] initWithObjects: ({int x = 0; while (x <= 60 ) { return x; x++; } })]; Thanks :) ...