Phunzirani kukonza masewera a iOS: kudziwa Xcode

momwe mungapangire masewera a iOS

Ndikuyamba Nkhani za iphone ndizolemba zingapo zamaphunziro: Ndikuphunzitsani momwe mungapangire masewera a iOS mu Xcode; Nthawi zonse, kuchokera pafupi, kosavuta, komanso kupewa maluso, kuti aliyense amene ali ndi chikhumbo akhoza kupanga masewera azida za Apple. Ine ndalemba masewera anga aposachedwa masiku angapo apitawa, Nsomba Lite.

Zolemba izi ndizoperekedwa kwa anthu omwe amadziwa makompyuta, koma popanda malingaliro apadera; Mwachidule, makamaka pamadongosolo oyamba, aliyense akhoza kutsatira. Tidzakhudza zina mwazofunikira za Xcode, ndipo pambuyo pake, tigwiritsa ntchito Cocos2D kupanga masewera osavuta.

Ndinaphunzira kupanga masewera ndendende chaka chimodzi chapitacho, ndikungokhala ndi malingaliro oyambira pa intaneti; kotero aliyense amene ali mumkhalidwe wofanana akhoza kuchita! Mukungofunika Mac (popeza Xcode, chida chogwiritsidwa ntchito, chimangothamangira pa Apple), mukufunitsitsadi, ndikusiya mantha anu a makompyuta ambiri!

Poyamba, tidzakambirana za pulogalamu ya Apple: kupanga mapulogalamu a iOS, simuyenera kulipira chilichonse, ingotsitsani Xcode ndi iOS SDK. Izi zitilola kuyesera; Koma nthawi ikafika, tikufuna kuti luso lathu liziwoneka mu App Store, pamenepo, inde, tidzayenera kulipira ma 80 Euro kuti tipeze laisensi yovomerezeka ndikutha kutero.

Ndizinenedwa kuti, tiyeni titsitse xcode kuchokera patsamba la Apple, kapena kuchokera ku Mac App Store. Kukhazikitsa kwake ndikosavuta, muyenera kungoyendetsa fayilo yomwe tatsitsa ndikudikirira (Kungakhale kofunikira kulembetsa ngati mungasankhe njira yoyamba kutsitsa, koma ndi yaulere).

Tikayika, timatsegula, ndikupanga projekiti yatsopano. (file>yatsopano>polojekiti).

Mwa zonse zomwe mungasankhe, timasankha yomwe timawona m'chithunzichi:

Masewera a Pulogalamu: Kusankhidwa Kwama template mu Xcode

Ndi ntchito yosavuta ndi zenera limodzi. Kenako timayika dzina pazomwe tikufuna kugwiritsa ntchito, komanso chizindikiritso cha kampani (china chake chonga layisensi yamasewera anu, zomwe zimapangitsa kuti izidziwike ku Xcode). Mutha kuyika chilichonse. Samalani mabokosi omwe muyenera kuwunika kapena kuwunika:

Masewera a Pulogalamu: Kusankhidwa Kwa Dzina

Popereka zotsatirazi, tikuwona kapangidwe kamene xcode imawonetsa popanga projekiti:

Chithunzi chachikulu cha Xcode

  • Pamwambapa, zowongolera zingapo zomwe zingatilole kuyendetsa pulogalamuyi kuti tiyese pakompyuta ndikuwona momwe ingawonekere pa iPhone / iPod.
  • Kumanzere, ndi mafayilo omwe amapanga pulogalamu yathuyi.
  • Pakatikati pali zosankha zathu. Tikuwona kuti titha kusintha mtunduwo, kusankha ngati tikufuna kukhala wa iPod / iPhone kapena Universal, kapenanso momwe ntchitoyo ikuyendera. Pakadali pano, timasiya chilichonse monga momwe zilili.
  • Kumanja, Xcode imatiwonetsa zosankha zomwe tiziwunika pambuyo pake.

Kubwerera kumanzere, timayang'ana makalasi kapena mafayilo omwe timawona mkati mwa chikwatu choyesa. Tikuwona kuti lililonse lili ndi matembenuzidwe awiri omwe ali ndi dzina lomwelo: lina lotsiriza ndi ".h", lina litha ".m".

Mu ".m" muli zomwe zili, code, titero kunena kwake; pamene enawo, pakadali pano sitikusowa.
AppDelegate ndi fayilo yomwe imayamba nthawi zonse ntchito ikayamba. Nthawi zonse, osasankha. Mulimonse momwe zingakhalire. Lili ndi chidziwitso chofunikira, monga mawindo omwe ayenera kunyamulidwa, kapena choti muchite poyambira Ngati titalowa mu AppDelegate.m, tiwona kuti pamalo ena, amatchula «ViewController".

Sanjani Masewera a iOS: AppDelegate.m File View

Izi zikutanthauza kuti kwa ife, oyang'anira Ndilo dzina la fayilo kapena "zenera" lomwe liziwonetsedwa pulogalamuyo ikayamba, fayilo ya AppDelegate ikamaliza kuwerenga. Itha kuyitanidwa mwanjira iliyonse, koma mwachisawawa, ndi dzina lomwe yatenga.

Popeza kuti phunziroli ndi koyamba kulumikizana ndi Xcode, popanga ntchitoyi tagwiritsa ntchito template yomwe imapanga chojambula choyamba komanso chokhacho "mothandizidwa ndi mawonekedwe"; ndiye kuti fayilo yachitatu viewcontroller.xib(kuphatikiza pamitundu viewcontroller.m ndi viewcontroller.h zomwe tidakambirana), zomwe titha kusintha mosasintha popanda kugwiritsa ntchito mizere yapa code, yomwe imathandizira kukhazikitsa mapulogalamu.

Chifukwa chake, timadina ndi mbewa pa viewcontroller.xib (mawonekedwe owonekera a fayilo yathu yoyamba, viewcontroller), ndikukoka chinthu «chizindikiro»Kuchokera pagawo lomwe timapeza pansi kumanja (muyenera kulipeza kuchokera pazinthu zonse zomwe zili mgululi)

Viewcontroller mawonekedwe mawonekedwe

Mukamaliza, timadina kawiri pachizindikirocho, ndikuyika zomwe tikufuna. Pambuyo pake, tinayang'ana batani kusewera zomwe timapeza kumtunda kwa pulogalamuyi, ndipo timayikanikiza ndi mbewa; Monga tikuwonera, "Simulator ya iPhone" yasankhidwa, chifukwa chake titha kuganiza kuti tiyesa kugwiritsa ntchito pa iPhone ...

Kupanga Masewera a iOS: Xcode Simulator

Izi ndi zomwe zimawonekera! Muli kale ndi pulogalamu yanu yoyamba. Mukafuna kutseka, dinani batani Imani.

Ndikukhulupirira kuti, ngakhale simukumvetsetsa chifukwa cha zinthu zambiri, mwadziwa Xcode. Kapangidwe kake, pulogalamu yake yoyeseza, etc.

M'maphunziro otsatirawa, tikambirana Zamgululi; template yosiyana ndi yomwe tidagwiritsa ntchito muchitsanzo ichi, yomwe tidzaikamo mu xcode yathu, ndipo yomwe itilolere kupanga masewera m'njira yosavuta, yokhala ndi nambala yocheperako kuposa momwe ikadafunikira tikadapanda kukhala nayo!

Zambiri - Nsomba Lite

Tsitsani - Xcode


Zomwe zili m'nkhaniyi zikutsatira mfundo zathu za malamulo okonzekera. Kuti mufotokoze cholakwika dinani Apa.

Ndemanga za 26, siyani anu

Siyani ndemanga yanu

Anu email sati lofalitsidwa. Amafuna minda amalembedwa ndi *

*

*

  1. Wotsogolera pazosankhazi: Miguel Ángel Gatón
  2. Cholinga cha deta: Control SPAM, kasamalidwe ka ndemanga.
  3. Kukhazikitsa: Kuvomereza kwanu
  4. Kulumikizana kwa zomwe zafotokozedwazo: Zomwezo siziziwululidwa kwa anthu ena kupatula pakukakamizidwa mwalamulo.
  5. Zosunga: Zosungidwa ndi Occentus Networks (EU)
  6. Ufulu: Nthawi iliyonse mutha kuchepetsa, kuchira ndikuchotsa zidziwitso zanu.

  1.   Alfredo anati

    Zodabwitsa

  2.   Djdared anati

    Nkhani yabwino !!

  3.   Marco anati

    Chochitikacho chinali chabwino kwambiri, ndinayesera kuti ndiyambe koma ndinachisiya, kuti ndiwone ngati ndingathe kulumikizidwa.

  4.   July anati

    Zikomo chifukwa cha nkhaniyi!

  5.   Eduardo Way anati

    Zabwino, ndimayembekezera china chonga icho!

  6.   Antonio Villagran anati

    Zabwino, kangati mupitiliza kutumiza zolemba ngati izi.

  7.   J. Ignacio Videla anati

    Nkhani yabwino, ndine mapulogalamu a PC ndi Android masewera, chowonadi chikuwoneka ngati chabwino kwa inu, ndakhala ndikufuna kudziwonetsa ndekha pa iOS, mwina, mwina, tsiku lina, ndidzakhazikitsa xcode ya windows ndipo pamenepo zitseko zidzatsegukira osauka ngati ine xD

    1.    paco rr anati

      mutha kugula mac os x ndikuyiyika pa pc, ndikosavuta kusaka pa intaneti

      1.    J. Ignacio Videla anati

        Ndikukukhulupirira, koma choyamba, ngati zingagwire bwino ntchito, ndikukayika kuti mac angagulitsidwe momwe amagulitsidwira ... ndipo sindikunena izi chifukwa chamtengo wapa kompyuta, komanso mtengo wokwera posindikiza mu malo ogulitsira, omwe amayerekezera ndi nsanja zina Ndiokwera kwambiri.

        1.    David anati

          Kwenikweni ndimalemba lingaliro la paco, ndikukulemberani kuchokera pa hackintosh, yang'anani mitundu ya iatkos ndikosavuta kuyiyika, sindinagwiritse ntchito windows kwanthawi yayitali

          1.    David anati

            Anthu ambiri sasintha chifukwa cha mantha omwewo komanso malingaliro amisala omwe akhala akukoka.

  8.   Miguel Mathüs anati

    Zabwino zonse pazomwe mwachita Sergio

  9.   ant0on anati

    Zikomo kwambiri, zonse zowonekeratu poyambira koyamba, ndimazikonda kwambiri ndipo ndili ndi malingaliro chikwi kale m'maganizo ... Ndikukhulupirira kuti mulimba mtima ndikupitilizabe kupeza nkhani zabwino ngati izi.

  10.   Fernando Sanchez anati

    Zabwino kwambiri, ndikhulupilira kuti mupitiliza osakhala nawo maphunzirowa theka ngati ambiri.

  11.   Sergio Epulo anati

    Zikomo kwambiri nonse, ndine wokondwa kuti mumakonda! Ndiyesetsa kupereka zonse zomwe ndili nazo m'mawu otsatirawa, ndipo ndikuyembekeza kuti muwapeza achisangalalo :)!

    1.    magwire anati

      Ndisanalowe m'dziwe ndi cocos2d-iphone, ndimaganiza zoyambitsa zophunzitsira pa cocosbuilder 3.0 ndi cocos2d-js mwachindunji, zikuwoneka kuti pali tsogolo labwino, komanso ku Spain, womwe ndi ufumu wa Android ndipo ndi wabwino lingaliro lochotsa zinthu zapulatifomu.

      Ndikutenga mwayi uwu kwa inu omwe mutsatire maphunzirowa kuti muwone http://www.raywenderlich.com, pali matani azambiri zothandiza pamitu yambiri pamapulogalamu a iPhone, kuphatikiza masewera.

      Mwa njira, zikomo kwambiri pamasewerawa

    2.    Raquel anati

      Moni, ndife gulu la ophunzira aku yunivesite omwe ntchito yawo ndikupanga pulogalamu yosavuta pamutu wina. Timakonda kwambiri zofalitsa zanu, ngakhale zili choncho tasochera pang'ono pamutuwu chifukwa sitinazichitepo kale. Kodi titha kulumikizana patokha kuti tiwone mwayi wathu? Zikomo 🙂

  12.   Zosankha anati

    Munthu wofufuza kakang'ono amazindikira kuti mac siyofunikira kugwiritsa ntchito osx ndi zooneka iaktos

    Kubwereranso kumutu Nkhani yabwino kwambiri komanso yoyeserera bwino mabuku ambiri a xcode ali mchingerezi ndipo ndizovuta muyenera kuganiza zakusindikiza buku mu sitolo ya apulo ibook

  13.   Fernando Sola anati

    Ndikuganiza kuti ndi lingaliro labwino !!! pitilizani !!!

  14.   lalex anati

    Ndikukulimbikitsani ngati ambiri kuti musasiye kusindikiza maphunzirowa ndipo ndidzakhala wokhulupirika wanu pobwera mkalasi

  15.   Ayi anati

    Bravo, zikomo kwambiri pakuchita izi.

  16.   Jovijano anati

    Ndangogula Mac mini yachiwiri, kuti ndiphunzire kupanga pulogalamu ya IOS, ndatsitsa kale mabuku ambiri m'Chisipanishi ndipo posachedwa ndiyamba kuyesa kuthana ndi Xcode, ndikukuthokozani kwambiri chifukwa chochita izi ndipo ndidzakhala wotsatira wanu nthawi zonse.
    Zikomo…

  17.   Zoyendetsa ndege anati

    Ndikufuna zambiri !!

  18.   Fernando Hdez anati

    Ntchito yabwino, nkhani yabwino, ngakhale ndili ndi funso
    Kodi pali njira yothandizira koma windows pulogalamu ina?

    1.    Cristian Diujenio D. anati

      Kwa IOS, komanso papulatifomu iliyonse yamtundu uliwonse, pali Adobe Flex ndi Air, Frameworks yomwe imalola kukula kwa mapulogalamu. Ndiyo yankho lokhalo lomwe ndapeza kuti ndikupanga china chama foni apulo kuchokera windows. Kapena kwezani makina enieni okhala ndi mac os x, kuti muthe kukweza xcode, ngakhale sindikuvomereza, chifukwa ndikumva kuwawa. M'malo mwake, ndibwino kuyika ndalama mu mac, ngati cholinga chanu ndi kugwiritsa ntchito IOS.

  19.   eduardo aldaz anati

    Ndithandizeni ndi phunziro lotsatira kupitiliza ndi zopereka zabwinozi? Zikomo..