![]() You will have a fully functional application, with almost no code! Text field, draw a line from the textfield to AppController, and chooseįinally, save the Xib file, wait for the XcodeCapp icon to flicker green and then become a solid black, then open index.html. If you want to be able to change the label when you press enter from the This time, the dark dialog will show all available actions exposed by the Of the action (so in that case, the button), and go to AppController: Connecting the actionsĬonnecting the action is the reverse process. Same process: draw a line between the AppController and the text field, then choose myTextField. Set it to myLabel, which is what you have declared in your code. When you release the mouse button, a small dark dialog will ask you what outlet it should be: Connecting the label to its outletĭraw a line between the AppController object to the label, using right click (or cmd + click): ![]() Return to Xcode in order to indicate the outletsĪnd the actions. Let’s AppController : CPObject Defining outlets and actions from Xcode It, it will be the button that will interact with the code. Need an outlet for the button because, the code will not interact with We only need an outlet for the text field, as we want to read the textįrom the code and the label as we want to change its value. Not necessary to create an outlet for every control. ForĮxample, our application may not interact with all the labels. Want to be able to access a control added using Xcode from your code, you Outlets are entry points between Xib/Cib files and you code. To do so, open AppController.j in your favorite editor. Now that we have a UI, we need to code the actions we want to use with ourĬontrols. Note that you have not written a single line of code! Code the outlets and actions Now, the UI is ready, you can load your application and you should see your UI: In the operations tab you can see what XcodeCapp is currently processing. When there are errors or warnings, the icon will turn orange. XcodeCapp will give you more information about any current errors. You will be noticed by a user notification if something goes wrong during the conversion. Every time you save a change to the Xib file, XcodeCapp will convert it automatically. XcodeCapp will do it automatically for us. When your UI is ready, we need to convert the Xib file into a Cib file. Edit the contentĬhange the content of the label and the button, by double clicking on them:Īlign all the controls to your pleasing. Really help you to build a nice, aligned UI.Īlso add a button (search for “push button”) and a text field (search for “text field”). You will see Xcode has a system of automatic rulers that will Just drag and drop the label into the window, and position it where you On the bottom right part of Xcode, you’ll see a library of controls. To do so, open the main window, by double clicking Window - Windowīy default, there is a text field and a slider. This is where you are going to build you UI. Resources folder from the tree view on the left and select MainMenu.xib. With Xcode we can place controls without writing any code. To launch the Xcode project of your Cappuccino project,Ĭlick on the XcodeCapp icon (the hammer). You should never need to editĪnything in it. XcodeSupport and an XcodeProject named Your-Application-Name.xcodeproj. XcodeCapp will have generated a hidden folder located in your root The initial time to load a projectĭepends on the size of the project. You may notice some user notifications indicating XcodeCapp isĬurrently loading the project. Choose the folder of theĬappuccino project you just created. ![]() There is only one button - go ahead and click it!Ī standard folder chooser dialog will appear. The main window of the application shold be displayed as well. ![]() Once launched, you will see a small coffee machine icon in your Mac OS X menu bar that should be grayed out. In the default installation, you’ll find it here: /Applications/XcodeCapp.app/ XcodeCapp is a great tool that allows you to manage all necessary conversionįrom Xcode to Cappuccino. To get it to work, but there’s an easier way.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |