iOS sdk printing multiple images - ios

i'm working on my first app and now i'm trying to implement air print in a customised version of the "Autoscroll" Apple sample code. basically i present the user with the print controller from a custom button and then they should have the choice of printing the image they have selected. autoscroll works in this way: you have 2 scroll views in a view controller a big one that allows zooming and a small one that slides in/out by tapping once on the big one. the small scroll view contains a number of thumbnails that are loaded in the big scroll view on selection by tapping. so far by studying the print photo sample code i manage to print one image; the first one loaded when the view controller is presented. i'm aware that multiple ready to print images have to in an array, but the example in the printing and drawing guide has 1 line of code and talks about an array of image views. the images i need to print go inside a scroll view.
thanks in advance for any help.

Xcode as a sample source code that u can use to archive what u want, since it as already some of the features that you want to implement.
The name of the project is ScrollViewSuite and you can download it from here: here

Related

How to use CoreData with two view controllers one of them has collection view

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

iOS swiping/paging between detail pages of Collection View Items

I am working on an iOS app using Xcode 10 and Swift 4.2. I have a collection view that has images and once you tap on the image it takes you to a detail page that has the full-sized image, date and saying displayed. The data for these details are stored in an array and passed from the collection view to the detail page. I want to be able to swipe left or right and go to the previous or next item from the collection view as you would in the photos app.
Is there any built-in functionality that allows for easy paging/swiping, or is a programmatic manipulation of the array index the only way to accomplish this task?
I don't know if you are familiar with CocoaPods, but there are plenty that can work for you, for example there is SwiftPhotoGallery, but that just maximizes images and let you swipe right and left as you said.
For the specific functionality you describe I would suggest that in the navigation to the "Detail Page" you sent the whole array too, and just show the index of the item tapped in the collection, your "Detail Page" will be a UICollection as well but with a custom cell that takes the whole space of the screen and with a horizontal flow so you can swipe right and left, if you have this code in your github account or any other repository I'll be willing to help to make my point clearer.

Multiple Photos in slideshow type display within viewController?

I am new to Xcode (started a few days ago).
I'm trying to find a way to get a few photos or videos in a display where the user can scroll or tap through as they desire. There will be multiple viewControllers each with a different set of photos.
Is there any existing UI type data types I can just drag and drop to make this work? Or is this out of range of the capabilities for someone not using code specifically.
I know Java, C, C++, MATLAB, etc. but never have toyed with Objective-C until now. Point being, I should be able to follow any logic you can throw at me, but I'm unfamiliar with the GUI and layout of Xcode as a whole.
This is what I currently have.
This is what I want. Perhaps with functionality to tap to full screen the image or swipe to go to another image. (This image was made with photosop. I don't actually have the picture file in Xcode because I don't know how)
SOLVED: Placed desired images in "Supporting files" content folder inside Xcode. This allowed me to select which photo I want displayed in which ImageView. To fix the proportionality issue where photos in Simulator are far too large, I simply added height and width constraints along with some other centering aspects and got the desired result.
Add UICollectionView in your view and set flow of collection view is horizontal make cell size that you want to keep.
Take a look at UICollectionViewController where you can display multiple cells with embedded views for your images, and consider segueing between them via a UINavigationController.
Edit: Now that you've added screenshots, I'd recommend using a UICollectionView embedded on your subclass of a UIViewController instead of a UICollectionViewController. This should give you more flexibility.

TVOS about App layout (Like in iTunes and similar)

I have played a lot with my app and I do not understand how to make layout like in for example iTunes (also many apps uses it).
How it is made? It is one big CollectionView, but with special Flow or it is TableView with many CollectionView?
Collection headers. In iTunes App if I select item (with adjustImageWhenFocused) under the header then the header will jump up and the item will not overlap the header. It is special magic or it is system behavior and I just do know how to use it?
Below is two screenshots about what I am trying to tell you and example with my app.
In iTunes there are movie preview page. With what type of View it is made? TableView,CollectionView or just ViewController with ScrollView?
I have read many sources and looked up demo projects, but nowhere I have found answers for this questions.
1) I think it would be a stackTemplate containing a couple collectionLists.
2) AFAIK the headers "jump up" on their own, no need to prepare anything special.
3) productTemplate?
For examples, see https://github.com/iBaa/PlexConnectApp, /TVMLTemplates/Default/Movie_OnDeck.xml (1) or Movie_PrePlay.xml (3).
Or check the gold source: https://developer.apple.com/library/tvos/documentation/LanguagesUtilities/Conceptual/ATV_Template_Guide/StackTemplate.html, plus other Templates.
If you want to use native Swift way it can be achieved in following ways:
You can use table view and have collection view within each cell. I am using same approach to achieve this.
We have focus update delegate from there you can find the focused frame of image view. With the help of focused frame and label frame you can check if they are intersecting or not. Based on that you can move label up and down.
This is native TVML template, in order to achieve in swift you need to create view using tableview and collection view.

Is there any way to make a custom table view cell look like a button in Xcode 6+?

I'm trying to create a Table View Cell array and have the name displayed in each table. The tables will look like what you see on the home screen of the Evernote app (shortcut, tags, places, notebooks etc.) and each one will access the next screen when tapped. How do I go about doing this? Novice app developer.
This is an image of the result I'm trying to get.
That is a basic cell with transparent background and other views (and images, layers, etc.) added as subviews.
For the other things I suggest to study how UITableView works and how to push a UIViewController using a UINavigationController.
In general you should study iOS and Objective-C from zero.

Resources