Similarities between iOS development and Android development

Source: Internet
Author: User
Tags uikit

Recently more busy, there have been relative to the Android understanding of the idea, so recently saw something about Android, found that as long as iOS, the development of Android will be relatively fast.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/7E/wKioL1X_snnz2TS9AAEgKn54niA020.jpg "title=" Len_ Top.jpg "alt=" Wkiol1x_snnz2ts9aaegkn54nia020.jpg "/>

Android Development tutorial More, the development environment on the MAC configuration is relatively simple, so whether to install eclipse to develop or Android studio is relatively easy, nothing more than Jdk+adt, it is recommended to install a GM Android simulator, faster than the self-equipped simulator.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/81/wKiom1X_tjDgVjU-AAI6kZV3yZE273.jpg "title=" screen shot 2015-09-21 pm 3.46.30.png "alt=" Wkiom1x_tjdgvju-aai6kzv3yze273.jpg "/>

Drag Controls Same as storyboard.


Next is the first step, Hello World, after using Android studio, the system will automatically create an activity, similar to the iOS root view controller. If you want to see the interface effect quickly, learn the control that is equivalent to the Uikit framework: Andriod.widget (contains Button,textview,editview,imageview,scrollview).


Most of the layout of the Android is in the XML file, if it fits in the code, it feels very troublesome, unlike iOS, Android generally does not use absolute coordinates, so Android development needs to learn the layout (linearlayout,relativelayout, etc.), It feels the same as iOS xib, and you can drag the controls. Xib is also the structure of XML, the inspiration is from the HTML, the most image of Android.


<textview android:text= "@string/hello_world"  android:layout_ Width= "Wrap_content"     android:layout_height= "Wrap_content"      Android:id= "@+id/textview"  /><button    android:layout_width= "Wrap_content"     android:layout_height= "Wrap_content"     android:text= "New  Button "    android:id=" @+id/newbutton "    android:layout_ Alignparentbottom= "true"     android:layout_alignparentright= "true"      Android:layout_alignparentend= "true"     android:layout_marginright= "43DP"      android:layout_marginend= "43DP"     android:layout_marginbottom= "41DP"      android:onclick= "OnClick"/> 

The above XML code is the Android layout, feel a look will understand what to do, so it is easy to engage iOS An Zuojin.


One of the most important things about iOS when you're doing iOS is TableView, Android and it's a ListView, and it's interesting that beginners tend to reuse (and, of course, reuse is similar, if you create one for empty). Controls similar to Uicollectionview in the Uikit framework are girdview. May be girdview unfamiliar, feel collectionview than girdview powerful too much, can almost all kinds of layout.


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/73/80/wKioL1X_wUqgwPG8AAFbqktDWHc964.jpg "title=" 20130801165101734.png "alt=" Wkiol1x_wuqgwpg8aafbqktdwhc964.jpg "/>

The syntax is Java and OC, Java is the beginner may understand some deviation. Interfaces in Java are similar to the proxy delegate in OC, where interfaces and proxies are written behind interface, and methods in interfaces and proxies need to be implemented. are mainly used for event or parameter passing. The anonymous class structure in Java is similar to the Blcok in OC, but it feels a bit different, a bit like an anonymous class containing multiple blcok. But so far I do not know how to achieve a single blcok like OC, will definitely need to cram.


Development tools are almost the same, breakpoint debugging and so on are more similar. Spit it out. Android: Android console output Too many things unrelated to this program, but also to filter to solve. As far as the simulator is concerned, Android is going to be slow to die, but downloading other like GM simulators can be solved. In terms of development, such as adding gestures to view, Android is a hassle, and iOS can be a few blocks in seconds. And the Java array using too much trouble, array, ArrayList, vector do not know which, OC a nsarray all done. (The above may be no use of the method or useless habits, but the use of feeling a bit awkward).


There are a lot of similar things, such as activity and Uiviewcontroller are managed with the stack life cycle, String provides various methods of comparison class, because all belong to the front so more similar things are normal. At present, Android development only looked at a small part (data persistence, network requests, webview, etc.), has not been carried out in combat, so know not much, later study will also come to share.


Similarities between iOS development and Android development

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.