I'm new to swift and started to program a simple application in xcode. The application has multiple tabs in which in the firs one the user enters some data and the data should show in another tab. However I'm not able to achieve this as I don't know how to update a screen with the new data. Any help would be appreciated.
Related
Is there a way to reset all contents of the application when user goes back to the home screen? Basically while users are using my app, certain view controllers save items in a list but instead of deleting all these items individually, I want to be able to reset the data like as though the users started the applications fresh.
Please, any help would be greatly appreciated
Thanks!
Ok, there is no automatic way to reset all contents. You must detect application goes to background event and manually delete all data.
I am developing an app that needs to be able to print out name labels after a user finishes a registration process. It needs to do this without displaying a popover which is automatically created when using UIPrintInteractionController.
I know other apps have approaches where they print directly after the user touches a print button that is placed in the view controller. Fx the iPrint&Label app by Brother.
How can I create a similar button that allows the application to print automatically without displaying the popover dialogue box?
p.s The application doesn't have to be app store clean, the final application will only be installed on two specific iPads.
p.p.s this is my first entry on stackoverflow, I hope I'm not being to much of a newbie :-)
It is possible on iOS 8 and newer - use printToPrinter:
Docs here: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPrintInteractionController_Class/index.html#//apple_ref/doc/uid/TP40010141-CH1-SW34
My iPad app collects some user data, including name, address, phone, etc. I have a button that allows the user to create a new contact from this collected data.
Right now, my code creates a contact record (ABRecordRef) and sets some values (ABRecordSetValue). All the sample code I've found for the next step creates an ABUnknownPersonViewController and presents it in the existing navigationController.
I can get this all to work, but I don't want to use the navigationController, however when I present this in a modal view I don't know how to detect when the user has finished adding the contact once the Contacts page is shown. As well, I don't know why there are so many screens involved--I would like them to just hit my button and voila; the data is added as a Contact.
So, some questions:
Do I need to present an ABUnknownPersonViewController or can I bypass all of that and just write the data out to the Address Book?
If not, can I at least bypass one of the two screens presented (after the ABUnknownPersonViewController screen, a Contacts screen with edit ability is presented)?
If I present the ABUnknownPersonViewController in a modal view can I detect when the Contacts page is finished so I can remove the view?
Thanks!
erdekhayser's comments put me on to the Apple docs which led me to this post here: How to add new contact to iOS Address Book?
This appears to be a good example of how to do this programatically.
I have a messaging system, theres a inbox view and a viewmessage view, if i go back to the inbox im still reciving data from that message, and if i load another conversation between me ad another user its still loading the previous conversation data i had (verified by logging the convo's, and the new one i have open, and its a continuous loop so to say... basically im trying to figure out how to totally close out a view... i seen dissmissViewController and used that, but all it does is visually make the view go away... it doesn't truly close it.. whats the method to call to do what im trying to achieve?
These are all modal views, my app uses no navigation views due to the nature of the app
edit: i found some great documentation that im going to look over hopefully i'll get my answer from there.
Using Delegation to Communicate with Other Controllers
I am very new to this area of iPhone app development and have been looking through some links to understand it.
The requirement of my app is very similar to a phone contacts app.
I need to have a TableView on my home page with a few names on it. Whenever a name is clicked, it should open up another TableView with has further details (like mobile phone number, home phone number etc.).
I have been able to create the first TableView with the name of people but am unable to create the 2nd one and link it with the first one. I am using Storyboards to achieve this.
Also, if there is some free source code available for such an app, then that will be great!
you can add
[self performSegueWithIdentifier:#"segueName" sender:self];