iphone

Textfield problem.

Hi guys, Here is a problem with my textfields. -(void)textFieldTextDidChange:(NSNotification *)notif { event.eventName = eventTextField.text; event.eventPlace = eventPlaceTextField.text; event.eventWinery = wineryTitleLabel.text; int vintageVal = [vintageTextField.text intValue]; if([vintageTextField.text length]>0 ...

How do I add vcardfile in the composer sheet of an iPhone application

in the mail sheet im able to add images but where as im not able to attach vcard file MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init]; picker.mailComposeDelegate = self; [picker addAttachmentData:ExportVCF mimeType:@"text/x-vcard" fileName:@ "JOHNSMITH.vcf"]; but when i send...

iPhone SDK: dismissModalViewControllerAnimated:

Hello guys! I have an UIViewController which was displayed by invoking the presentModalViewController method and now I want to dismiss it with the dismissModalViewControllerAnimated: . Everything works fine but is there any event or a delegate method which I can catch to handle the dismissing of my UIViewController? ...

NSFetchedResultsController, CoreData, SectionIndex and special chars (Umlaute..)

Hi, I am having problems with NSFechtedResultsController and using the created sectionIndex(data is coming from a CoreData storage). It seems to mix up the indexTitle versus the sectionName e.g. sectionName is "Ä" and sectionIndex is "Ƒ" (0x0191) regarding the unicode char. This seems to be the case with all special chars. this can lead...

Adding/simulating a Delete Button in a UITableViewCell

Hello, I have a UITabeView with some sections and rows. I want to simulate the Delete Button that appear when you are editing the Contacts, a red button (the size of the cell). Should I use a button for this ? I've tried to add a background image for the button but I can't 'repeat' it, maybe I have to create one with the final size. ...

How can I reduce the number of annotations on a map?

I'm coding a map view with around 900 annotations. Having this many annotations on a map make the performance suffer, so I'd like to reduce it to about 300 at a time. The annotations are representing shops in a country, so they tend to cluster a lot around major cities, then in small groups of 2 or 3 in smaller towns. I want to reduce th...

Inverse relationship warning - ask for practices on using inverse relationship

I have the Order table which contains information about a specific order, (when does it start, how many people, etc...) and that Order table has To-Many relationship to Menu Item table. I call that relationship "orderItems". The compiler gives me warning, "Order.orderedItems -- to-many relationship does not have an inverse: this is an a...

How to take a screenshot programmatically

I want a screenshot of the image on the screen saved into the saved photo library ...

How to shrink/extend height of view according to the text

I have a UITableView, to which I add a Header-View, designed in InterfaceBuilder. This Header-View has two UILabels. The first label takes a title, that is always present. The second one displays a description, if present. Both strings can be quite long. Is there a way to extend or shrink this labels and the view so that the text is sho...

iPhone development time...

I have been asked to develop a relatively simple iPhone application. However, it would be my first application. I am a fairly competent programmer and can turn my skills to a new language fairly quickly... what my question is, is... How long has it taken some of you guys to make your first iPhone application and what was your experien...

iPhone: Set value of current textField

Hi... I am calling an action from textFieldDidBeginEditing as follows: [dotButton addTarget:self action:@selector(actionButton:) forControlEvents:UIControlEventTouchUpInside]; and specifiying my action as: - (void) actionButton:(id)sender { textField.text = [textField.text stringByAppendingString:@"APPROVED"]; } Simple question wi...

How to insert multiple row of data to sqlite database by iphone programming

I am new to iphone development.I want to insert multiple values into my sqlite3 database and display the content in the tableview.I am able to insert single row of data in to my database and retrieve it and display the data but i am not able to do with inserting multiple row of data.Here is my code... -(void)initializeTableData{ sqlit...

How do i turn a UIImageVew or the image in it into a CGImage, and then back again?

I just don;t know how to do this. I want more flexibility to edit the image ...

Need help finding the leak in this code please.

#import <UIKit/UIKit.h> int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil);<-----This line gets highlighted as the leak [pool release]; return retVal; } It leaks right when I start the app. ...

Using NSKeyedArchiver and NSData to send UIImage over bluetooth

I was wondering if it is possible to send a UIImage over bluetooth after encoding it into a NSMutableData using NSKeyedArchiver. This is what I had in mind: NSMutableData *data = [[NSMutableData alloc] init]; NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]; [archiver encodeObject:[UIImage imageN...

Prevent word wrap with UITextView

Hi,using Iphone sdk 3.1.2 I have a UITextView control with vertical and horizontal scrolling enabled. I want every line of text to display without wrapping so that the user can scroll horizontally to see it. The issue I have is that even with horizontal scroll enabled, the text wraps at the width of the iphone screen i.e.320 pixels. H...

TDBadgedCell keeps caching the BadgeNumber

For a project I'm working on I'm using the TDBadgedCell as written by Tim Davies. While the cell works fine for the most part, the BadgeNumber keeps getting cached. I'm wondering how I can fix this. My [tableView:cellForRowAtIndexPath] message looks like this: - (UITableViewCell *)tableView:(UITableView *)_tableView cellForRowAtIndexPa...

iPhone SDK: How to restore NSMutableArray dataset after applying a filter?

I am trying to write a simple filter mechanism such that when the user types in a filter string the UIPicker filters it's data. I have it working almost. This is my filter code and it works. My question is, once I have applied a filter to a datasource, how can I remove the predicate and restore the original dataset? I am using NSMut...

How can I modify a CGRect stored as NSValue in an NSArray?

Hello, I am creating an NSArray with CGRects using the following line: [self setMyArray:[NSArray arrayWithObjects:[NSValue valueWithCGRect:CGRectMake(x,y,z,a)], [NSValue valueWithCGRect:CGRectMake(x,y,z,a)], nil]] I am then trying to update the CGrects in the Array every so often like this: for (NSValue *bound in myArray) { CGR...

iPhone and Sleep

Hello, I'm new to iPhone SDK. Any idea how to put the iPhone into the sleep mode from within the code (my application), as if the user has clicked the sleep/wake button? Best regards. ...