compare android vs_i_os
DESCRIPTION
TRANSCRIPT
Android vs iOSCOMPARISON
Aspects• Project structure
• Output final type
• Components build up
• Some other kind of facing
• Using style
Project structure
Output final type• .IPA
• .APK
Components build up• Naming
– NSString >< String
– NSObject ><Object
– NSInteger ><Integer
– ….
– UIView >< View
– UIButton >< Button
– UILabel >< Label
– UITextField >< EditText
– ….
• Storage– NSUserDefault ><SharedPrefrence
• Layout– .XIB>< .XML
• Controller– UIViewController >< Activity
• Logging– NSLog >< Log
• List Data– UITableView>< ListView
• Notification– iToast >< Toast
– UIAlert ><Alert
Some other kind of facing• Declare
• Import libs
• Switching screen
• UnitTest
• ATT
Declare
Object object = new Object();Student student = new Student("Nguyen Tuan Anh", "24", "Male");
Class Student{private String name;private int age;private String gender;
public Student(String name, int age, String gender){this.name = name;this.age = age;this.gender = gender;
}}
Import Libs• Same as:
– Add from static library:• .a >< .jar
– Add module: same way.
– Add from resource : • Cocoapod >< Maven
• Podfile >< pom.xml
Switching screen• IOS :
– Don’t have default screen
– Self.window setRootViewController
– Using navigation controller to deligate• pushViewController
• popViewController
• Android:– Using IntentFilter set default screen
– Throw an Intent to transfer data + switch screen
– Replace screen if using fragment
(using Support-V4 with FragmentManager)
Using style• Debugging
• Looping: for | while | do while | ..
• Constructor( init )
• MultiScreen
• MultiVersion
• Transfer data between multible screen
Debugging iOS
Debugging android
MultiScreen• IOS:
– IPad
– Iphone• pixel density:
– Rentina
– Not rentina
• Size screen:– 3.5 : Ip4
– 4 : Ip5
– 4.7 : Ip6 (near future)
– Something others
• Android: there are many way to understand it
– Pixel density:• Mdpi
• Hdpi
• Xhdpi
• Xxhdpi
• xxxhdpi
– Size screen:• Small
• Normal
• Large
• Xlarge
• XXLarge
MultiScreen
Transfer data between screens• iOS:
– setup next screen in current screen & prepare data for it before start.
– Other way:• No suggest
• File– SQLite
– NSUserDefault
– Core data (file has structure)
– …
• Android:– Same as model driven - new
way was applied this time.
– Other way:• Put data into Intent as bundle
• File– SQLite
– SharedPreference
– Simple file
Thanks for view!