iphone

Deploy application to iPhone Simulator

Hi, I am looking for a way to deploy my application to another users simulator. To be blunt the person needs to show the application on the simulator and is not capable of compiling the source code and I don't have the time to produce the instructions. What I want to do is provide them with the .app (or another) file and have them inst...

How to later assign value to optional attribute of NSManagedObject in a NSManagedObjectModel having Three NSManagedObjects which is already created ?

I am using coredata framework. In my NSManagedObjectModel i am using three entities that are Class, Student and Score where class and student have one-to-many & inverse relationship and Student and Score have also inverse but one-one relationship. Score entity has all optional attributes and having default '0' decimalVaue, which is not ...

Dynamically replace HTML element in UIWebView

I have some HTML loaded in WebView like this: <html><head></head><body>before <myTag>Content</myTag> after</body></html> I want to replace element myTag with custom text so it should look like: <html><head></head><body>before ____MY_CUSTOM_TEXT___ after</body></html> Also I can't change initial HTML. How I can do this with ...

invoking PopViewController on Main Thread from Secondary Thread

Hi Friends, I am doing my functionality in a secondary thread and once I get the result, I call the function that pops my ViewController in the main thread. But I get the following error: void WebThreadLockFromAnyThread(), 0x5c6dec0: Obtaining the web lock from a thread other than the main thread or the web thread. UIKit should not be ...

remove Annotation removes random amount of annotations at a time

I've got this code to erase an annotations (pins) in my mkmapview without erasing my blue dot (userLocation). The problem is that it erasing the pins I've added in seemingly random numbers. when it's called through an IBAction it removes the first 5 then click again it removes the next 3, then the next 2, then the last one. When presse...

Why does the last row of my tableview not align to the bottom of the screen

I have a view which consists of a tableview and a navigation bar. For my tableview I have implemented a 'Load more' row which will load current + pagesize every time it is clicked The way the loading works is very simple, every time it is clicked I just request the amount of rows I want to display e.g. 5, 10, 15 and so on. This request ...

using performSelector

Hi all, i've my method that implement a reverseGeocoder - (void)reversing { geoCoder=[[MKReverseGeocoder alloc] initWithCoordinate:locManager.location.coordinate]; geoCoder.delegate=self; [geoCoder start]; } i recall reversing in another method with this: [self performSelector:@selector(reversing) withObject:nil afterDelay:10];...

Help moving multiple images at once with touches

Here is my problem: I am trying to move a puzzle piece around the screen and then connect to the other piece if they are in close proximity. I have achieved this, though it is perhaps a little odd the way I did. My problem though is that once they have connected, I can't figure out how to move them as one image, instead of two separate e...

UITextView Bold Font iphone sdk

Hi , iam trying to bold / italic text but i use this code to bold my font but when i press bold button whole the UITExtView going to bold but i want select some text and bold / italic or change the color of them .. textPad.font = [UIFont boldSystemFontOfSize:12]; ...

iPhone SDK Core Data: Fetch all entities with a nil relationship?

I have a core data project that has Books and Authors. In the data model Authors has a to-many relationship to Books and Books has a 1-1 relationship with Authors. I'm trying to pull all Books that do not have an Author. No matter how I try it, no results are returned. In my predicate I've also tried = NIL, == nil, == NIL. Any suggestion...

how to set Custom attribute of NSManagedObject which is calculated from other attributes ?

I am using core data framework to manage objects.i have an entity which has several attributes of decimal types. Among them is attribute which is mathematically calculated from other attributes. Ex :- @interface Marks : NSManagedObject { } @property (nonatomic, retain) NSDecimalNumber * answerGradeA; @property (nonatomic, retain) NSDe...

[iPhone Obj-C] How to move a label with the wave of the iPhone?

The code below is from the book Beginning iPhone 3 Development, chapter 15, using the accelerometer to control a ball. I want to use a label instead of the ball, and only move in the x direction. However, I donno how to revise the code to achieve this goal. Can anyone please help me? THX so much!!!! - (id)initWithCoder:(NSCoder *)coder ...

dealloc on Background Thread

Is it an error to call dealloc on a UIViewController from a background thread? It seems that UITextView (can?) eventually call _WebTryThreadLock which results in: bool _WebTryThreadLock(bool): Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a s...

[IPHONE] How can I loop through all subviews of a UIView, and their subviews and their subviews...

Hello, How can I loop through all subviews of a UIView, and their subviews and their subviews... Thank you. ...

UIWebView goBack crashing

I have the following setup webview = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].bounds]; Occasionally I issue the method [webview goBack]; and this sometimes brings my app down in flames with EXC_BAD_ACCESS (SIGBUS). I tried to wrap this around a @try: @try { [webview goBack]; } @catch (id theEx) { NSLog(@"%@"...

Cocoa Touch: Why doesn't UINavigationController render 'Back' button?

When I push a view controller it animates properly and slides in, the only problem is that no 'Back' button is rendered up top.The back button is still there, I can still tap it, it just doesn't render on the screen. This behavior is identical in both the simulator and on multiple devices. Is this a known issue or bug? Using 3.1.3 of t...

UIImagePickerController presented inside view

Is that possible to present a UIImagePickerController inside a view, instead of using it modal or inside a popover? I have tried this, without success... if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypePhotoLibrary]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init...

Error loading my managedObjectModel

Hi guys, When I call [myAppDelegate managedObjectModel], in the retain line below, my application will crash (iPhone SDK v3.1.3): - (NSManagedObjectModel *)managedObjectModel { if (managedObjectModel != nil) { return managedObjectModel; } managedObjectModel = [[NSManagedObjectModel mergedModelFromBundles:nil] retai...

How to delete all objects for a given entity from the ManagedObjectContext

I don't want to use the reset method for my ManagedObjectContext. I only need to remove all of the objects for a specific entity, but I don't see any methods for doing this. Selecting all of the objects for a specific entity and looping over each and deleting them works, but it's very slow. ...

sqlite iphone connectivity check

Hi All, Is there any method available for checking the sqlite DB connectivity without calling sqlite3_open([writableDBPath UTF8String], &database) == SQLITE_OK everytime. We end up in database connection error after 120 continuous clicks. Please help. ...