I am a little stuck after reading a tutorial and trying to go it alone.
Essentially I am trying to link my form components (the text boxes and buttons) to my view controller window via control click and drop. In the book this looks fairly simple as its just a case of drag and drop but when I do it, nothing happens!
Please could someone give me some indication as to why this could be?
Please change the class of the UITableViewController in your storyboard to LoginTableViewController. Select the tableViewController in the storyboard and check the class inspector in Xcodes sidebar.You can change there to LoginTableViewController.
Related
First of all, I am new in coding, so please be patient with me.
My app has two view controller, the first has UICollectionView and the second has UITextField.
I am trying to tap on one of these collection view cells and then it takes me to the second view controller, where I can type in the textView then save it into CoreData. And then when I go back and press on the same cell i get my saved text. Then when i change this text on the ui text view.. it saved automatically.
Can any one give me an example or put me in the right track
The essence of how that might be done is to implement the collectionview delegate and then determine which cell they clicked on, so that the next screen loads/and updates the correct data. After they click you would call the "segue" with some code. The segues are setup in Xcode's visual editor by control click and dragging a line to the second view. (It's weird, there are some great youtube videos out there) The data would be stored in an array. After you update the data, you could dismiss the second view and the collectionview behind it would be visible again.
I would check out chapter 4.5 of the free iBook "App Development with Swift". Chapters 4.5-4.8 would really get your rocking the right path. If that book is too complex then also look into "Intro to App Development with Swift"
I even have some videos to take you through the process, dunno if I have one for 4.5 but if you continue with it, I have one for 4.6.
https://www.youtube.com/watch?v=Q5u9SGhQoPY&t=2254s
I am creating a quiz app and for the buttons I need an outlet collection. So far in the array, I only have one button but I want to add the other three. On the other tutorial I've watched, it says to click the button on the side and drag to the thing you want to add (image link below). This doesn't work for me, is there a certain way you need to click? I've done this before, but this time its not working. The difference this time is that I've created a new class. I am not very familiar with Xcode or swift, sorry. Thank you.
Xcode is really buggy as far as outlet connections are concerned. Emptying the Derived Data folder as well as clean / rebuild help. But results could still be problematic. However, the old way to connect things which has been around since before the existence of an Assistant editor still works reliably. Select the ViewController and drag from ITS outlets in the Connection editor to the storyboard items (i.e. buttons).
Use Interface Builder alone. Use the Identity inspector to make sure your view controller has the correct class, the class where you put your outlet collection property. Now use the Connections inspector for your view controller. You'll see the outlet collection listed there; drag from it to your buttons, one by one.
I'm trying to use the Core Data example found on iPhone Recipes App example to create a Core Data base for my App.
I've painstakingly duplicated all RecipeListTableViewControler, and there is an + or "add button in the corner," which trigger a modal segue to the screen which adds the name of a new recipe.
However, there is also a sent action "add:" linked to the RecipeListTableViewController, and I've spent a couple of hours trying to figure out how to duplicate this for my Storyboard, and I'm stumped.
Could someone help me figure this out?
Thanks.
I know how to link an outlet from the storyboard to the code, by control dragging from the button to the code, or from one view controller to another to create the segue. However, in this case I'm not finding a place on the storyboard that is linked to the sent action add as shown in the connections inspector. Also, there is not a radio button in the code that seems to be linked to this add: action in the example. As a result, I'm having trouble duplicating this same sent action to my code. I can't make the sent action appear as part of my add button in my connections inspector:
I suppose I'm expecting that when I mouse over the connections inspector item, something will get highlighted in blue on the button, the view controller, or I'll see a radio button acting area in the code, but I'm not getting any hints about how to connect this up when I try that.
Note: When I examined the connections inspector for the tableviewcontroller, I found out that the add: bar button item on the view controller is showing as undefined, so it may not be linked up to anything, and that's why it was confusing me why I couldn't find a link between it and the code.
I'm reading this book that teaches non-programers how to create iOS App. It's a step by step book.
To create the App, we use Xcode. And on one of the steps, on the storyboard, we have to add a cell in the table view controller and use "Right Detail" Style. And here where my problem is.
When I select the Right Detail Style, nothing happens. I cannot add any data in the cell or type anything. The content of the table is static (not sure if that's relevant).
However, when I run the simulator, the cell would show the default text of the cell, which are Title and Detail.
I don't have this problem with the others styles (the Basic, Left Detail and Subtitle).
Here is a screenshot that might help explaining it more:
Bear in mind I know nothing about programming.
This is my first programming attempt. So please be gentle :D. Thanks!
First of all you need to learn how to code..
Double click on the title and detail labels in your cell, you will be allowed to edit them
OR
got to the document outline and select them from there to edit them
I am parsing an xml file and displaying it's content in a UITableView, I want to set up the pull to refresh feature. I noticed in the "attributes inspector" there is a section that says "Refreshing", I set that to Enabled. How do I actually set up the action to reload the data in the table? Thanks in advance.
You can implements the pull to refresh feature programmatically via coding or by doing drag drops from the Storyboard. This is the example on how to do it in the easy way (using drag drops).
Check the refreshing attribute on inspector
Then take a look at the storyboard, there will be new view named Refresh Control created underneath the TableView. Do right click on the view then implements the Value Changed event.
Please see image below.