I'm using C structs in objc and I've created a function that assembles the structure like the one from the Cocoa API. The things is that this structure is not like NSRect o NSPoint this structure packs objc objects soo I'm seeing a potential memory leak here. Do I need to provide a function to 'release' the structure?
I'am not creating ...
Hello all, I have an array for instance,
Array {
3.0 at Index 0
2.0 at Index 1
3.5 at Index 2
1.0 at Index 4
}
I would like to get sort it in ascending order without losing the index in the first place, like this,
Array {
1.0 at Index 4
2.0 at Index 1
3.0 at Index 0
3.5 at Index 2
}
When I so...
I'm trying to learn the MapKit with Monotouch and I'm having difficulty figuring out how to search for an address. I finally found this snippet of Objective-C code that might help but it has a line where they use a URL to get a return value and I have no idea how to use this code in C#:
NSString *urlString = [NSString stringWithFormat:...
When I play a video with MPMoviePlayerController in my app my iPhone does not auto lock (tested OS 3.0 & 3.1.2). However, the application.idleTimerDisabled = NO, so this setting is not affected by MPMoviePlayerController.
How can I get my iPhone to sleep normally (e.g. after 3 min screen dims, then goes dark) when my app is running and ...
Any chance?
I want to know if it is set from "1 - 5 minutes" or set to "never".
Thank you!
...
I'm getting random crashes when creating an inferred mapping model (with Core Data's lightweight migration) within my application. By the way, I have to do it programmatically in my application while it is running.
This is how I create this model (after I have made proper currentModel and newModel objects, of course):
NSMappingModel *m...
Hi,
How can I use strike-through font in objective C??? More specifically in UITableViewCell
cell.textLabel.text = name;
cell.detailTextLabel.text = quantity ;
cell.XXX = ??
...
Hello,
my app crashes often in this for-loop:
for (int a = 0; a <= 20; a++) {
NSString * foo = [[NSString alloc]initWithString:[[newsStories objectAtIndex:arc4random() % [newsStories count]] objectForKey:@"title"]];
foo = [foo stringByReplacingOccurrencesOfString:@"’" withString:@""];
foo = [[foo componentsSepara...
The text lables in my UITableViewCells are getting displayed differently on the device than on the sim. How do I fix it?
...
I've saved the contents of server into a NSData. How do I copy the contents of NSData into a file.
...
I want to implement SMS functionality in my application. Is there any way to do this, or any documentation to implement this functionality? Can anyone provide sample code for this?
...
Sorry if this has been asked before, but I'm wondering what the best memory management practice is for NSURLConnection. Apple's sample code uses -[NSURLConnection initWithRequest:delegate:] in one method and then releases in connection:didFailWithError: or connectionDidFinishLoading:, but this spits out a bunch of analyzer warnings and ...
I got a notification mail after submitting my iphone application to apple store..
"During our review of your application we found it is using private APIs, which is in violation of the iPhone Developer Program License Agreement section 3.3.1; "3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must no...
Hi,
I added a UITableviewHeader to my tableview, is there a way to make it fix. I want to scroll with my TableView but always be able to watch the Header.
thanks,
...
After clicking on a UIView I want to take the user of my app OUT of my app and to another app on the app store. How do i do it?
...
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...
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...
Hi,
I have a problem with the memory management in Objective-C. Say I have a method that allocates an object and stores the reference to this object as a member of the class. If I run through the same function a second time, I need to release this first object before creating a new one to replace it. Supposing that the first line of ...
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 ...
The Background
A Cocoa Non Document Core Data
project with two Managed Object
Models.
Model 1 stays the same. Model
2 has changed, so I want to migrate
the store.
I've created a new version
by Design > Data Model > Add Model
Version in Xcode.
The difference between versions is a single relationship that's been changed from to a one t...