iphone

Couldn't I just pass an copied string to an Core Data property?

The docs say: The default implementation does not copy attribute values. If the attribute value may be mutable and implements the NSCopying protocol (as is the case with NSString, for example), you can copy the value in a custom accessor to help preserve encapsulation (for example, in the case where an instance of N...

NSInvocation object not getting allocated iphone sdk

Hi all, I'm doing NSString *_type_ = @"report"; NSNumber *_id_ = [NSNumber numberWithInt:report.reportId]; NSDictionary *paramObj = [NSDictionary dictionaryWithObjectsAndKeys: _id_, @"bla1", _type_, @"bla2",nil]; _operation = [[NSInvocationOperation alloc] initWithTar...

how to make an persistet attribute with an scalar value like CGFloat or CGRect, in Core Data?

Yeah, the documentation has an example: @interface Circle : NSManagedObject { CGFloat radius; } @property CGFloat radius; @end @implementation Circle - (CGFloat)radius { [self willAccessValueForKey:@"radius"]; float f = radius; [self didAccessValueForKey:@"radius"]; return f; } - (void)setRadius:(CGFloat)newRadius...

rotating a circle in UIView?

HI, i want to draw a circle in DrawRect through context like pie chart(took from tutorial) thorugh UITouch? i have given the code as follows,how can i rotate ? any help please? #define PI 3.14159265358979323846 #define snapshot_start 360 #define snapshot_finish 360 static inline float radians(double degrees) { return degrees * PI / 180;...

[iPhone]how to catch signal "EXC_BAD_ACCESS" ?

Hello, i would like to log every crash of my application... so i've tried to catch all signals. But it seems not working for "EXC_BAD_ACCESS" Someone know... If is it possible to catch it ? And how ? ...

iOS Question. Is There a Framework for Build Time Based Apps.

I have the need for some time based effects in the iPad app I am building. The UIView class animation capability beginAnimations/commitAnimations is exactly the sort of thing I am looking for but it is restricted to specific properties of UIView deemed animatable. Ideally, I am looking for a solution that lets me drive a time-based func...

What's -mutableSetValueForKey: returning, actually? Is that something special?

From the docs: You usually access to-many relationships using mutableSetValueForKey:, which returns a proxy object that both mutates the relationship and sends appropriate key-value observing notifications for you. So this returns an "intelligent" NSMutableSet which automatically lets the context delete objects when the...

How to convert NSDate into Unix timestamp in Objective C/iPhone?

How can I convert an NSDate to a Unix timestamp in Objective-C? ...

How to submit photo via http from iphone application

Hi Guys, Does anyone have any idea how can I save/upload a photo from iphone application via http? Thanks ...

Can I prevent iPhone from using 3G under any circumstances?

I'm writing a travel guide related app that will download large databases (60meg) potentially overseas, with the reachability code I can tell when a host is reachable via wifi or 3g BUT I'm worried that if for some reason the wifi connection breaks for a minute or so as some DSL connections are likely to do on occasion the iphone will sw...

[ipad] Is there a SDK for the photo gallery?

The "Photos.app" in iPad has a gallery that you can browse all photos, including support for slideshow and other things. I'd like to know if this API is available (aka, not private) and which one it is (so I won't need to implement one photo gallery from scratch). I looked at http://github.com/facebook/three20, but I'm not sure if it is ...

NSMutableRequest skd problem

Hi, I am trying to make a web call with the iPhone. I have done this before and it works fine but now I can't make it work. I am trying to use the following method call which the documentation says is availble in 2.0 and later: - (void)addValue:(NSString *)value forHTTPHeaderField:(NSString *)field; I am attempting to build for vers...

UITextField start at end of text

I have a UITextField that displays a long text string. The problem is that when I first open the view containing the UITextField, it automatically shows the end of my text; I want it to show the beginning. I read the UITextField Class Reference on the Apple dev center, but nothing seems to allow me to change it. How can I do this? ...

Cant bind data to a table view

Hi, I have retrieved data from Json URL and displayed it in a table view. I have also inlcuced a button in table view. On clicking the button the data must be transferred to a another table view. The problem is that i could send the data to a view and could display it on a label. But i couldnt bind the dat to table view ... Here's some ...

What is the problem with my code? I'm using MBProgressHUD

Hi, I'm using MBProgress HUD and I don't know what is the problem. I have a button that shows the HUD. This is my code: - (void)showHUD:(id)sender { HUD = [[MBProgressHUD alloc] initWithView:self.view]; HUD.mode = MBProgressHUDModeCustomView; [self.view addSubview:HUD]; HUD.delegate = self; HUD.labelText = @"No Inte...

Custom view in nib instantiated as parent type

I've created a custom class inheriting from UILabel. I placed a UILabel in my nib and set the class of the label to my custom class. However, when the viewDidLoad method is called, the view is of the class UILabel instead of my custom class. Any ideas? ...

UITableView section headers are blank and flickering.

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section]; if ([tempArray containsObject: [sectionInfo indexTitle]]) { [tempArray removeObjectAtIndex:[tempArray indexOfObject:[sectionInf...

Draw a cross at center of a UIImagePickerController.

Hello. I'm very new on iPhone development. I'm trying to draw a cross over the image obtained from camera. I'm using a custom ViewController that inherits from UIImagePickerController. When I star the application, I see the cross, but a few seconds after the cross disappears. Should I use cameraOverlayView? Thank you ...

jQuery + Webkit +... switching between CSS3 transitions/transforms and javascript automatically?

it may sound a weird question not easy also to explain: Jquery works flawless on any desktop web browser but as you may have already noticed is pretty cluncky on iphone/ipad/ipod because is not hardware accelerated as the webkit transforms are...the latter are very smooth...but they work only on apple products. my question is if do you...

What's the fastest and easiest way to create a new managed object?

When I have a subclass of NSManagedObject, I could do this: Friend *newFriend = (Friend*)[[NSManagedObject alloc] initWithEntity:@"Friend" insertIntoManagedObjectContext:moc]; But since I have a subclass, couldn't I simply instantiate it another way so that I don't have to tell it what Entit...