ATPL Dictionary 3.0

ATPL_170x170

Version 3.0 brings the exciting new “Autopilot” feature and an overhauled UI in preparation for the launch of iOS 7 on 09/18.

Full Version 3.0 Change Log:

– enhanced UI design, optimized for iOS 7. Users will be seamlessly transitioned to the new UI after upgrading to iOS 7. Users on iOS 6 and lower will continue to see the “legacy” UI.

– “Autopilot”: engage Autopilot mode by tapping on the microphone to have your definitions read aloud to you. (Requires upgrade to full version and iOS 7 or later)

– Updated app icon.

– Corrected known typographical errors.

– Some iPad users on iOS 6 were experiencing issues where definitions were truncated on the Word of the Day screen. These issues should be resolved with this update. If you continue to experience any layout issues send your feedback so I can pinpoint and fix them.

– Other bug fixes.

– Check out the new “iFunography Blog” listing in the menu so you can stay up to date on upcoming features, releases, and reports of currently known bugs/issues in ATPL Dictionary.

Reported issues:

– Definitions are truncated on the Word of the Day Screen on iPhone when running iOS 6.

– Bug prevents disabling Word of the Day from the menu.

– some definitions do not show when selected.

Update:

– Bugs fixed with ATPL Dictionary Version 3.0.1

Grab the update here.

Download_on_the_App_Store_Badge_US-UK_135x40

How To: Animate Showing and Hiding a UINavigationBar with Tap Gesture

The navigation bar is an important component of your app’s user interface but, sometimes, it can really get in the way of your content. Maybe you’d like to show a web page or an image, but the navigation bar occupies precious screen real estate, which essentially becomes dead space while a user is engaged with your content.

This tutorial quickly teaches you how to animate showing and hiding the navigation bar with a tap gesture.

#import "ViewController.h"
#import <QuartzCore/QuartzCore.h>;

#define kNavBarDefaultPosition CGPointMake(160,22)

@interface UIViewController () <UIGestureRecognizerDelegate>;

@end

@implementation UIViewController

- (void)viewDidLoad:(BOOL)animated
{
    [super viewDidLoad];

    UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer]
    alloc] initWithTarget:self action:@slector(animateNavigationBar)];
    recognizer.delegate = self;
    recognizer.numberOfTapsRequired = 1;
    [self.view addGestureRecognizer:recognizer];
}

- (void)animateNavigationBar
{
    CALayer = self.navigationController.navigationBar.layer;

    // If the navigation bar is shown, hide it.
    // Else, if the navigation bar is hidden, show it.

    if (layer.position.x == kNavBarDefaultPosition.x &amp;&amp;
    layer.position.y == kNavBarDefaultPosition.y) {
         [UIView animateWithDuration:0.25 animations:^{
             layer.position = CGPointMake(layer.position.x,
             -self.navigationController.navigationBar.frame.
             size.height);
         }];
    } else {
        [UIView animateWithDuration:0.25 animations:^{
            layer.position = kNavBarDefaultPosition;
        }];
    }
}

How To: Programatically Select a Random Cell in a UITableView

This little snippet of code shows how you can select a random UITableViewCell in a UITableView programatically. For example, you might want to trigger a random selection when the user shakes the device, or through some other action of your determination. Here I assume your familiarity with setting up a UITableView and implementing its associated delegate and datasource methods.

@interface MyTableViewController : UITableViewController {

// Declare arrays in @interface

    NSArray *section1;
    NSArray *section2;
    NSArray *section3;

    NSArray *randomSectionsArray;
}

- (void)viewDidLoad {

// Initialize arrays
    section1 = @[string1, string2, string3];
    section2 = @[string4, string5, string6]:
    section3 = @[string7, string8, string9];

    sectionsArray  = @[section1, section2,
    section3];
}

/* After implementing the delegate and datasource methods for the UITableView, 
   you can now implement the method to select a UITableViewCell at a random indexPath: */

- (void)selectCellAtRandomIndexPath
{
    int randomSectionIndex = arc4random() % sectionsArray.count;

    NSArray *randomSection = sectionsArray[randomSectionIndex];
    int randomRow = arc4random() % randomSection.count;

    NSIndexPath *randomIndexPath = [NSIndexPath 
    indexPathForRow:randomRow inSection:randomSection];

    [self.tableView selectRowAtIndexPath animated:NO
    scrollPosition:UITableViewScrollPositionMiddle];

    [self.tableView.delegate tableView:self.tableView
    didSelectRowAtIndexPath:[self.tableView indexPathForSelectedRow];

}


- (void)triggerAction
{
   //  Now, you can use your trigger action to select a random cell.

    [self selectCellAtRandomIndexPath];
}

That’s it! Happy coding.