Android vs iOS

download Android vs iOS

of 18

Embed Size (px)

Transcript of Android vs iOS

  1. 1. Android vs iOS @gotokatsuya
  2. 2. Environment
  3. 3. IDE Android iOS Android Studio Xcode
  4. 4. Simulator Android iOS Genymotion (Intel HAXM too) Xcode
  5. 5. Android iOS Gradle Dependency Manager compile 'com.squareup.picasso:picasso:2.5.0' pod 'SDWebImage', '3.7.2'
  6. 6. Semantic Versioning MAJOR.MINOR.PATCH 1. MAJOR version when you make incompatible API changes. 2. MINOR version when you add functionality in a backwards-compatible manner. 3. PATCH version when you make backwards-compatible bug xes. http://semver.org
  7. 7. Widget
  8. 8. Android iOS TextView UILabel Text TextView textView = new TextView(ctx); textView.setText(Android); var label = UILabel(); label.text = iOS; EditText UITextField UITextView
  9. 9. Android iOS Button UIButton Button var button = UIButton() button.setTitle("I'm Button", forState: .Normal) Button button = new Button(ctx); button.setText("I'm button);
  10. 10. Android iOS ImageView UIImageView Image var iv = UIImageView() let image = UIImage(named: "image.png") iv.image = image ImageView iv = new ImageView(ctx) iv.setImageResource(R.drawable.image)
  11. 11. Android iOS ListView UITableView List var tableView = UITableView() tableView.registerClass(UITableViewCell.self, forCellReuseIdentier: "Cell") tableView.dataSource = self tableView.delegate = self ListView listView = new ListView(ctx); String[] values = ArrayAdapter adapter = new ArrayAdapter(this, R.layout.simple_list_item_1, R.id.text1, values); listView.setAdapter(adapter);
  12. 12. Library
  13. 13. Android iOS OkHttp Alamore HTTP Networking OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url(url) .build(); Response response = client.newCall(request).execute(); Log.d(Response, response.body().string()); Alamore.request(.GET, url) .responseString { _, _, string, _ in println(string) }
  14. 14. Android iOS Picasso SDWebImage Image downloader Picasso .with(ctx) .load(url") .into(imageView); let imageURL = NSURL(string: "url") imageView.sd_setImageWithURL(imageURL)
  15. 15. Android iOS Realm Realm ORM Realm realm = Realm.getInstance(ctx); realm.beginTransaction(); // Create object User user = realm.createObject(User.class); user.setName("KATSUYA"); realm.commitTransaction(); // Create object let user = User() user.name = Katsuya" let realm = Realm() realm.write { realm.add(user) }
  16. 16. Good things
  17. 17. OSS
  18. 18. Android iOS ParkedText https://github.com/gotokatsuya/ParkedTextView https://github.com/gmertk/ParkedTextField A text with a constant text/placeholder