Showing posts with label iOS. Show all posts
Showing posts with label iOS. Show all posts

Wednesday, February 04, 2015

Try Ionic framework hybrid app on Mac

Introduction


Ionic framework is a cross-platform HTML5 Javascript CSS framework for hybrid app.
It works with AngularJS and Cordova (PhoneGap).

Check the Ionic documents for details, you will find what it provides.
  • AngularJS: data binding, page routing...
  • AngularJS Extensions (the magic of UI components; View Controller pattern; Javascript Utilities )
  • Ionic Icons
  • CSS UI Components, which you can use Sass to customize.
  • HTML5 Input Type
  • CLI Command line tools - CLI FAQ
  • Demos and Examples - check the Kitchen Sink App with examples demonstrating most of Ionic's features.
  • App Template: iOS-like Tab View Controller template; Side menu template;
  • Community Forum where you can discuss the issues with Ionic.

http://situee.blogspot.com/2015/02/try-ionic-framework-hybrid-app-on-mac.html

Wednesday, October 15, 2014

iOS Set Navigation Bar Back Button Title

In summary, to set the back button title of the current ViewController, we create a backBarButtonItem for the previous ViewController.


situee.blogspot.com


Wednesday, July 30, 2014

iOS define local and global NSString constant

situee.blogspot.com

1. Local Constant

There are two type of constants.

(1)  static NSString * const kMyConstant = @"constant string";

(2)  #define kMyConstant @"constant string"


"static const" is a better way, although "#define" is much shorter,

Here are some reasons:

  • "#define" are not type-safe. 
  • We can test the value of the "static const" constant with debugger;
  • Memory. Preprocessor create a new string each time the macro appear, while "static const" reuse the same string.

2. Global Constant

----------------  .h file  --------------

extern NSString *const kMyConstant;

----------------  .m file  --------------
// define in a .m file OUTSIDE @implementation like...

NSString *const kMyConstant = @"my constant";

The extern declaration says that there exists an NSString * const by the name kMyConstant whose storage is created in some other place.[1]

Remove the static -- that specifies that kMyConstant is only visible in files linked with this one.[1]