iphone

I am using CATiledLayer and UIScrollView, how can I dynamically set CATiledLayer properties?

Basically speaking I am making a map framework (like Route-me and Google Maps). I want to change some properties of CATiledLayers which are not documented. So I dont know if it is possible: I want to dynamically set properties of CATiledLayer, such as layer size, tile numbers, what conditions to trigger reloading tile source, and bindin...

How to control the color of a UIWebView (before contents load)?

I am trying to have a BLACK colored UIWebView before its contents load. In IB, i tried both making the background color of the UIWebView black, as well as, making it have a transparent background and have its parent view's background be black. Both don't work. When my UIWebView loads the background of it is white. How can I fix this? *I...

Switching between landscape views

What is the best way to switch between views that are both in Landscape mode? I've tried with a simple "Push and Pop" methods that work fine when I try them with Portrait views but when I do it with Landscape for some reason it does the switching like the method was supposed to work just for Portrait views and a the end of the switch it...

Best practices for MacOS/iPhone library cross compiling

I've build a static library working nice in a Cocoa Touch environment. Now I'd like to compile it also for Cocoa.. Can I have a single XCode project with different sdk targets? Is there some resource out there able to give hints about best the practices in this (and other) sense? ...

Store png/pdf file in sqlite

Hello, How to store pdf,png file in sqlite. is this possible to store pdf and png file? Please help me out. if you have any idea please share with me. Thanks you, ...

should variable be released or not? iphone-sdk

Hi, In the following piece of code (from a book) data is an NSDictionary *data; defined in the header (no property). In the viewDidLoad of the controller the following occurs: - (void)viewDidLoad { [super viewDidLoad]; NSArray *keys = [NSArray arrayWithObjects:@"home", @"work", nil]; NSArray *homeDVDs = [NSArray arrayWithOb...

Iphone NsMutableArray Count

I have a struct SystemStruct *sharedStruct = [SystemStruct sharedSystemStruct]; implemented as a singleton, to share 3 Arrays. the problem is that when i try to count the array's objects the system crash. es: This code Crash: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { SystemStruct *Sha...

How to detect touches on MPMoviePlayerController window and still having the standard playback controlling

Hello I have the MPMoviePlayerController set up to play a movie.I want to detect a touch on the movie for bringing up few buttons.I used the code : // The movie's window is the one that is active UIWindow* moviePlayerWindow = [[UIApplication sharedApplication] keyWindow]; // Now we create an invisible control with the ...

how MyspaceApi works

I download the demo version of MYspaceId of iphone sdk.But i dont't know how it is work ...

How can we send MMS attachments from our iPhone application?

Hi all In my application i want to send a attachments, Test through MMS. How can we do it using iPhone SDK. Please help me out. Thank you ...

Authenticating stackoveflow programatically - OpenID

I would like to add up and down voting to my iPhone appilcation - MyStacks, for this I need the to be able to authenticate the user with SO. I'm look at adapting the Twitter-OAuth-iPhone library. However The problem I have is obtaining the consumer and secret key. to use OAuth, do I need to obtain a different key for each provider? In...

Replace occurences of NSString - iPhone

Hi everyone, I have a long NSString in which I m trying to replace special characters. Part of my string looks like this: "veau (c\u00f4telette)","veau (filet)","agneau (gigot)","agneau (c\u00f4telette)","b*\u0153*uf (hach\u00e9)","porc (hach\u00e9)" I would like to replace all the \u0153 with "oe". I ve tried: [response stringByRepla...

Limit number of charchters in uitextview !

Hello All , I am giving a text view to tweet some string . I am applying the following method to restrict the number of characters to 140 in length. - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{ if([text isEqualToString:@"\b"]){ DLog(@"Ohoooo"); r...

Sort an array with special characters - iPhone

Hi everyone, I have an array with french strings let say: "égrener" and "exact" I would like to sort it such as égrener is the first. When I do: NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES]; NSArray *sortDescriptors = [NSArray arrayWithObject:descriptor]; NSArray *sortedArray = [myArray sor...

Capturing a NSParseErrorException

Could someone tell me how I can capture a NSParseErrorException? The Situation: my app downloads a small .plist file. I convert this into dictionary using the string method -propertylist. This normally works fine. I check for a connection before going to retrieve the file, so it works fine if I've got a connection to the internet, a...

How to add a Tab Bar to an existing view controller, without XIB

Hi, I'm trying to avoid using Interface Builder as much as possible. At the moment I have the view controller created via code and change views via code as well. I now need one of the steps to send the app into a new view with a tab bar, that will allow me to change views as well. Ideally, what I'd do is tell the current view control...

Getting different output from setRegion: on MKMapView

Here is my question: When I am trying to set the zoom level of my map, I is zooming to a different level than I requested. Here is the code I am using: MKCoordinateRegion cRegion = MKCoordinateRegionMake (myMapView.userLocation.coordinate, MKCoordinateSpanMake(.001, .0001)); MKCo...

How do I disable screenshots on iphone or automatically watermark image?

Hi, I want to prevent the distribution of images from an iphone app that I've authored. As such, I would like to either prevent the screenshot feature from working whilst my app is running or, if the user does take a screenshot, to watermark the image automatically. Any ideas as to how I could so this? ...

Core Data: Keypath "objectID" not found in entity

I'm using NSFetchedResultsController with a predicate to load a list of Documents in my application. I want to load all the Documents except the currently active one. I am using Rentzsch's MOGenerator to create a _Document class and then I put all my custom code in the Document subclass. _Document generates an objectID property with typ...

Serious Application Error

I have a TableView controller class that uses a fetched results controller to display a list of 'patient' entities taken from a Core Data model. The sections of this table are taken from a patient attribute called 'location'. Here is the sort descriptor for the fetch request: NSSortDescriptor *locationDescriptor = [[NSSortDescriptor all...