Category: Final Project

Creating a Done Button

As described before, the eaGeier needs a doneButton e.g. to close the date picker.

As it is needed on several occasions, it is best to create it lazily in its getter method. To do that create a custom button, set its frame and its font. To get the “button-style feeling” set the background using a gradient image. Setting its alpha to 0.8 shows what is below but still keeps the text of the button readable. And finally set the action which should be fired when the the button is touched:Continue reading “Lessons learned from eaGeier #7”

Creating a Date Picker

The eaGeier needs the possibility to enter a date e.g. to specify the purchase date for a voucher. Just providing a simple text field seems a little bit tedious. Thus – instead of opening a normal keyboard – the eaGeier provides a date picker, when a date field is selected, but at the same time keeps the possibility of entering a date via a hardware keyboard.

Sending a PDF File

Yet again the excellent documentation at Apple provides all you need to send an email. Start by initializing a mail-composer view controller, add a subject, a text and the file you want to attach as NSData. To allow the user to set the mail recipient just provide an empty array for the recipients. Set the delegate if you want to use the delegate functionality and finally present the mail view controller.