objective-c

CoreData : App crashes when deleting last instance created

Hello, I have a 2 tabs application. In the first one, I'm creating objects of the "Sample" and "SampleList" entities. Each sampleList contains an ID and a set of samples. Each sample contains a date and temperature property. In the second tab, I'm displaying my data in a tableView. I implemented the - (void)tableView:(UITableView *)...

iphone app custom images inside UILabel

Hi, I have got scenario where i would like to find where text in UILabel is ending and get its coordinates in terms of x and y. Then I need to insert image right after last word of UILabel text. This event will be fired when I click on particular image in app. How can I find what are the x and y of ending character of UILabel text? Reg...

How to update Root view based on selection in detail view in split view based ipad App?

I have used Split view controller in which root view as well detail view both inherits table view. I want to update Root view based on selection in detail view how to do that? I dont want to add new navigation view in root view. Please help as early as possible. ...

Problem with NSString

I have a problem with NSString in dynamic binding ... I manipulate with Facebook library, when i'll share my story i should make an instance of FBStreamDialog and charge its attributes with values of the story then show it, like this: FBStreamDialog* dialog = [[[FBStreamDialog alloc] init]autorelease]; dialog.delegate = self; dialog...

Mail Composer Address Problem

I found email composer sample code from iphone OS Ref Library. Here is a code- Code: NSArray *toRecipients = [NSArray arrayWithObject:@"[email protected]"]; NSArray *ccRecipients = [NSArray arrayWithObjects:@"[email protected]", @"[email protected]", nil]; NSArray *bccRecipients = [NSArray arrayWithObject:@"[email protected]"]; My ...

Problem with parsing XML with iPhone app

Hi, I have a problem with a xml parsing. I have create a class for parsing. The xmlURL is correct (testing it from debug) but when i call the method parse the variable success become FALSE and a errorParsing is "NSXMLParserErrorDomain". Can you help me? My code is below. #import "xmlParser.h" #import"Posizione.h" @implementation xmlP...

how to go to next page of pdf in objective-c if pdf have multi pages.

i have multi pages pdf,i want to go to the next page of pdf, how to go this. ...

Distance between a line and a point in Objective-C ?

Hello, I have 2 class : // point : (x, y) @interface ICPoint : NSObject { NSInteger x; NSInteger y; } // line : y= ax + b @interface ICLine : NSObject { float a; float b; } and this method: // return the distance between a line and a point -(NSInteger) distance:(ICPoint *)point { return fabs(-a*point.x +point.y -...

implicit declaration of function 'objc_lookUpClass'

I am getting this warning for the line code: Class myClass = objc_lookUpClass([_className UTF8String]); I am adding #import <Foundation/NSObjCRuntime.h> #import <objc/objc.h> And it still don't resolve the problem Another warning i get on this line is: "Initialization makes pointer from integer without a cast" ...

when setting a property does the property name always change to camelcase?

So if a have this property: @property (nonatomic, retain) MKReverseGeocoder *reverseGeocoder; and i want to set it, does the case always change: [self setReverseGeocoder: ... Seems a bit weird to get used to! I mean the property name is lower case! ...

Table View problem...plz help...!!

hi Frnz, i want to delete multiple rows from a table view based on users selection.obviously i cant use didSelectRowAtIndexPath method coz it will be called for every row selected. i want to allow user to select multiple rows for deletion and then delete them in one go...Is it possible if yes then how to go about it.Also i am using a si...

Adding libraries to a project in xcode - symbols not found

I am trying to make an iphone app in xcode that uses pjsip. The problem is I don't know how to link the libraries. This is the first time i am using other libraries so probably i am doing something wrong i just don't know what. :( I have the ARM version of the libraries in this folder in mac os x. /Users/kudorgyozo/pjsip_iphone In Xcod...

Sending an image in a faceless email

I am trying to send a faceless email (sending an email without showing the interface), using the code below. I also want to attach an image to this email. Is this possible? - (void) sendEmailTo:(NSString *)toStr withSubject:(NSString *)subjectStr withBody:(NSString *)bodyStr { NSString *emailString=[[NSString alloc] initWithFormat...

Parsing a problematic RSS feed on iPhone

I have a small test app that parses a few RSS feeds. It all goes well for all except for one. I scanned through the feed's XML and noticed that it fails once it reached a tag that has "&" in it. So, if I have a tag like this: <like>beer & barbeque</like> The log says that it found a string beer And it crashes with the exception ...

Newbie: UINavigationController is pulling me back from further learning :(

I have created a window-based application and my problem is I am unable to create UINavigationController on the go. InFact I don't know how to do that. My AppDelegeate - (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after application launch [window addSubview:logInVi...

Why won't the method not found warning go away?

I have a class with a method that works and I have tested it but xcode still raises a warning over the method: MapPoint *mp = [[MapPoint alloc] initWithCoordinate:[newLocation coordinate] title:[locationTitleField text]]; no 'initWithCoordinate:title' method found? ...

Loading an image sequence in InterfaceBuilder -ObjectiveC

Hi Using Actionscript and or in the Flash IDE you can either instantiate bitmaps from the library, or simply import bitmaps into the timeline of a MovieClip to create an image sequence. How would you do the same thing in InterfaceBuilder and-or using ObjectiveC? Do I need to create a new view for each and every image? ...

how to unlock rootviewcontroller header file in iphone

Hi Acidentally locked my rootviewcontroller.h file in my application, so if i write some code in that file it shows "Not Writable RootViewController.h", i am a beginer so please help me how to unlock that .h file. thanks in advance ...

data loading - app launching on tableview

hi, i encounter an issue with my application. On one hand when my app launches, the first view displayed is a tableview within a tableviewcontroller. On the other hand my app calls a web service to collect data. These methods are in MyAppDelegate\applicationDidFinishLaunching. The thing is that my tableview is made of custom cells th...

Enable access for assistive device programmatically

Hi All, I want to enable Access for assistive devices in System Preferences programmatically. But Problem is that my application is not running as root user and i do not want my application to be as root user and also should not ask for any authentication in between. I want to tap all keyboard events globally. I am using CGEventTap...