Add items to list and then print it (iOS) [closed] - ios

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm currently working on a restaurant app on iOS and I'm kinda new to programming.
Now, in my app, I have items in a tableView, and I want the user to add the items to a list (Their Order) and they must be able to view that list with their items in it.
If they are satisfied, they must be able to print it to a printer connected on a network and if they print it, it must look more or less like this:
item (with their price on the end)
item
item
Total (and then the total amount of all the items on the list)
If this is possible, can you please help me.
Thanks!

At a high level, your app creates a print job, providing either an array of ready-to-print images and PDF documents, a single image or PDF document, an instance of any of the built-in print formatter classes, or a custom page renderer.
In iOS 4.2 and later, apps can add support for printing content to local AirPrint-capable printers. Although not all apps need printing support, it is often a useful feature if your app is used for creating content (such as a word processor or a drawing program), making purchases (printing order confirmations), and other tasks where the user might reasonably want a permanent record.
This chapter explains how to add printing support to your app. Just go through the developer.apple - Drawing Printing

Related

Customisable iOS Interface [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am currently developing an iOS app that can be used by different clients keeping pretty much the same interface for all of them. I would like to make this interface somehow “customisable” without having to change the storyboard for every client but I am not sure how to do so.
I thought that maybe I could have some sort of XML file that would contain the value of the UI elements, modify it and have the app read the value of the UI elements from it at compile time so the final app would contain the desired messages, images, etc.
To make the changes easier I also thought of some kind of “wizard” that would show the UI elements that can be changed, allow me to edit and write them to the xml file and after all that, compile the app from the command line (running a script from inside the wizard).
Is my idea viable? If so, how can I accomplish it or what tool are out there that might help me?
Is there another option that would help me accomplish this “customisable” interface?
Note: this is my first iOS app and is still being developed, I searched for related topics and info but found nothing useful so I am not sure if I am asking even possible to do for iOS or if it is out there under another "name".
Edit: by customisable I mean being able to change the text of the messages, the labels, the banner, the clients img logo, color of some elements and that kind of things.
Edit 2 what I would like is to develop a "wizard" that will modify an xml file and maybe replace some images in my app before it is compiled (that is my current idea). After that I would compile it and all the customisation would be done and the app would be ready for the client.
I would suggest that you look at targets http://www.itexico.com/blog/bid/99497/iOS-Mobile-Development-Using-Xcode-Targets-to-Reuse-the-Code
You could generate your XML file for each "Target", but only include the correct one for each target. Then when the app is compiled it should include all the relevant information. If you are producing multiple apps, you also need to consider that the app bundle Id would need to be different for each. Again Targets handles this

Same code base in different apps [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Here's my problem: Today my company has an app that communicates with a specific server, but we received demands to develop this same App for different servers, so a few things need to be changed in the App (like the URL to call and the logo).
I do not want to create a whole new application with 99% of the code the same in my Xcode just to do that, because it would be really difficult to develop new stuff.
I'm wondering if it's possible to maintain the same base code with just small changes to different applications.
Hope I made myself clear, thank you.
Just to answer my own question, I just found this guide:
https://itexico.com/blog/iOS-Mobile-Development-Using-Xcode-Targets-to-Reuse-the-Code
Different targets and preprocessor macros are just what I needed, pretty sweet!
For something like this, I'd suggest using easy-to-manipulate stuff like plists and so on to make a core app like a framework that would be able to read an XML for example, and parse its data into different fields of your Plist and apply the settings based on that data for every new app that you have.
So, you should have items like url and logo, etc. in your settings Plist, and getting to read them in the app rather than setting values manually inside the app. This way, you'll be able to drop different image files called logo.png for each app, or edit the value for url in your Plist, and the app will read the value from the Plist.
However keep in mind that Plists are good if you don't have a giant list of items, because they can be slow if you get a really big one, but they're so quick and handy for average number of items.
I hope this helps.

Does your app contain, display, or access third-party content? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
So as I'm submitting my iOS application a new question pops up from Apple that I've never seen before.
Does your app contain, display, or access third-party content?
Yes it does, it contains random images of players from Google such as this: http://gyazo.com/6ed035ba3dd79bfba7fc5c5afce12354.png
I'm also HTML parsing matches from FoxSports as shown here: http://gyazo.com/4957af9a5326ee7d953eb621506d07ac.png
However if I tick Yes, it asks me another question:
Do you have all necessary rights to that content or are you otherwise
permitted to use it under the laws of each App Store territory in
which your app is available (for example, fair use)?
Do I have those rights?
EDIT:
If I use this Google Image search and tick "Labeled for reuse" could I use the image and just give credit to the link ?
http://gyazo.com/bb472c1382357de3ad8d431ed95cf589.png
Did the copyright owners of those images give you permission to use the images? If so, you have the rights. If not, you probably don't.
Contact an intellectual property lawyer if in doubt.

Why can't I deep link directly to turn by turn navigation on any map app in iOS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
After some searching, I've discovered that there's nothing I can do from my app to open one of the major map apps and start turn by turn navigation immediately. (If you know, please tell me)
In Google Maps, Apple Maps, and Waze, I can deep link into the app and have the route shown to me (usually by setting "saddr" and "daddr"), but human intervention is still required to actually start the navigation. All of these are one click away, but then the actually "Route, start, or go" button is quite small and hard to hit on a phone while you're actually in a car with your phone on a dock.
I'm just curious why this is, I can't figure it out. The only hunch I have is that they have to open a more persistent connection with the device and they want to avoid DoS attacks or something like that. It seems like an easy flag to put in their API, and I've seen various other questions trying to do what I'm trying to do.
And even if all that is true, they can still probably have a different flag where navigation is one click away with a button that covers half the screen, much better than a button barely the size of my fingertip.
Hopefully someone has some expertise on this so I don't go yelling at engineers working on the map apps.
The answer is simply that none of the major map app developers have allowed this. There is no technical reason why iOS apps couldn't do this; they just don't. The decision is probably because they want to require user interaction before starting directions, as most apps allow the user to edit parameters or choose one of several routes before navigation starts.

Google showing website inner search engine results, how does it work? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Sometimes when I search in Google, appears a website and just below... several links from that website. Sometimes also (I don't know if it's related) I click on a result and the website shows me the page with the search terms highlighted.
How does that work? I mean, which technology or standard do I have to implement in my website in order to archieve those effects?
Thanks
Do you mean sitelinks?
Google's systems analyse the link structure of your site to find shortcuts that will save users time and allow them to quickly find the information they're looking for.
They only show sitelinks for results when they think they'll be useful to the user.
You can read more here http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=47334
EDIT
To answer your question, all you can do is make sure you have a well formed site with clear navigation which your users can use and find useful. If your site popular then Google will do the rest.
Google shows highlighted search terms on its cached pages
When you're viewing a cached result the page is stored on Google's servers - so they can modify as they wish (highlighting search terms).
If you're viewing them on actual websites this is due to either:
Google wrapper around the page (such as mobile viewing)
Google toolbar (or similar)

Resources