Lessons learned from eaGeier #3

Printing a PDF File

Printing works like before straightforward following the instructions of the documentation at Apple. Start by obtaining a printing controller and check if printing is available at all:

UIPrintInteractionController *pic = [UIPrintInteractionController sharedPrintController];
if  (pic && [UIPrintInteractionController canPrintData:pdfDataWeWantToPrint] ) {
    // we should be able to print
}

Continue reading “Lessons learned from eaGeier #3”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lessons learned from eaGeier #2

Creating a PDF File

The eaGeier allows to print its data or to export it via email as PDF file. For both it needs to create a PDF file first.

Creating a PDF file works straightforward following the instructions of the documentation at Apple. Start by opening a new file and start with a page:

UIGraphicsBeginPDFContextToFile(pdfFileName, CGRectZero, nil);
UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 612, 792), nil);

Continue reading “Lessons learned from eaGeier #2”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lessons learned from eaGeier #1

Display a Message when a Table is empty

When the eaGeier is opened the first time and there is no data available for display in the tables, it would be nice to display an appropriate message instead an empty table.

An idea was to adjust numberOfSectionsInTableView:, tableView:numberOfRowsInSection: and tableView:cellForRowAtIndexPath: accordingly. However as NSFetchedResultsController is used to populate the table with Core Data and it monitors the table closely the manipulation of the table outside its scope was not easily possible.

Instead I added an sub view on top of the table view displaying the empty-table message. To prevent showing it while data is still loading, I used a delayed animation to present the sub view.

eaGeier – empty table message
FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Final Project: eaGeier

The eaGeier has been developed as final project for the Coding Together course.

It’s an tool for accounting on cash basis mainly used for small companies in Austria (Einnahmen-Ausgaben-Rechnung) and Germany (Einnahmen├╝berschussrechnung).

The app is a local port from the server application at www.ea-geier.at.

A demo of the app is available at YouTube.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail