Automatic scrolling in a PDF using Swift - ios

I'm a newbie to iOS and just recently finished the Swift developer tutorial on the Apple website. I want to create a program that loads in a PDF that can automatically scroll, like a teleprompter. I was looking through the PDFView documentation, but could not find a scrolling function. The closest things I could find were go but I don't understand what it means by rectangle and scrollSelectionToVisible which I'm not quite sure what it does. Any help / tips / general Swift knowledge would be appreciated! Thanks so much!

The only way to switch to vertical scrolling is to start all the way from scratch at CGContextDrawPDFPage
If the selection is not visible, scrolls view so that it is.
You can put pdfview on the top of UIScrollView and then give a timer to let it auto scroll like PDFExpert.
You can visit the demo from Apple.
Visit hereZoomPDF
It needs time to make it happen, nobody can tell you how to make it happen quickly , based on my experience it's the core code about PDF application such as PDFExport, but the mind is same, you can do as I said.The PDF inherits to UIView, so you should know why it can support auto scroll. Chose UIScrollView , it's right choice.

Related

Scrolling UICollectionViewCell to background instead of vertical

I'm trying to recreate the Shazam Discover UI by subclassing UICollectionView/UICollectionViewFlowLayout.
I've got as far as paging the cells and making them the right size, however, I'm having trouble getting the cells to scroll to the background, as in, I don't have a clue on how to get it done, I've searched everywhere but can't seem to find it.
An example of what I'm trying to achieve:
Any help/tips on how I could do this would be greatly appreciated.
edit: I ended up building my own solution:
https://github.com/JoniVR/VerticalCardSwiper
You could use third party libraries to achieve the same.
You may use StickyCollectionView. This is an Objective C based library. I believe this one with some customization will help you to approve this.

ScrollView with multiple Views iOS Autolayout

I am a newbie iOS developer currently working for a small company. I started developing iOS only some months ago and i only know how to work with Swift and AutoLayout. I have a little bit of a situation since my boss asked me to do a complicated scrollable view that contains other type of views within it.
I made a sketch using wireframe that is available here: https://wireframe.cc/MU0PC6, and i will also leave a print screen. So my question is: Is this achievable using AutoLayout and Swift? If it is can you please help me do it? If not, can you please point to a good tutorial that can help me do it using nibs?
Thank you, and sorry for my english and newbie skills.
Here is the screenshot
In order to create complex scrollable layouts with different elements and sections you should use a UICollectionView.
You can read into it here:
UICollectionView Tutorial
All the different parts of the layout would be individual UICollectionviewCells and you can control the size of them through UICollectionViewDelegateFlowLayout.
You can also build it using just UIScrollView and AutoLayout of course but the UICollectionView approach saves you a lot of headaches and when developing for iOS the UICollectionView is one of the most vital UI components anyway.

iOS 9 Swift 2: horizontally scrollable views? Facebook's "suggested friends/groups"

I am writing an iOS app in Swift 2 using Xcode 7.
I want to display a set of a user's trophies. For this, I am imagining a horizontally scrollable display as each trophy image is small, but users can have more trophies that fit across a screen.
You can see a Sketch example here: i.stack.imgur.com/VtpEc.png
I first thought that I could use a UIScrollableView, but I don't think this will work because user's are NOT supposed to be able to zoom into these trophies. BUT, if UIScrollView is the way to go, then how do I go about implementing it horizontally and without zoom? The most similar feature in an app that I have found is in Facebook's iOS app. Facebook uses these "horizontally scrollable views" for suggested friends/groups.
You can see what I am talking about in this screenshots: Facebook Horizontal Scroll
This feature also seems to be built in to Apple's iOS. When choosing which action to perform, users are presented with a "horizontally scrollable list" of apps to choose from.
See what I'm talking about here: built in iOS horizontal scroll
I would appreciate any help that anyone can offer! Thank you!
They're using a UICollectionView with an horizontal flow layout.
This more detailed answer might help you to figure out how to implement it: https://stackoverflow.com/a/19435898/5741377

How to Create Dynamic-Sized Paged Horizontal UIScrollView Using AutoLayout in Xcode 6

I Want to create a UIScrollView In Storyboard Using AutoLayout.
Horizontal Paged Scrolling Enabled,
Dynamic Page Size Adaptability (that is, page size should adapt for iPhone 4s thru iPhone 6 Plus screen size)
I'd be thankful if someone would give me a direction as to how I Should proceed to achieve this.
I have searched around the web for this but haven't found anything as clear and as accurate to what I want to achieve.
I solved it myself.
Here is the link to my demo of what I wanted to achieve.
Hope this helps others too.
https://github.com/ArshAulakh59/ScrollAutoLayoutTest
Apologies for the delay guys but now I have added the steps to achieve this via video on the github page.

How to implement auto scroll view using corona sdk in lua programming?

I want to add a scroll view and it should scroll automatically (auto-scroll). Is there any way to achieve it, please share your suggestions or ideas
Thank you, Madan Mohan.
If you mean "auto scroll" as the screen moves with the character then you should take a look at Lime
http://justaddli.me/
http://developer.anscamobile.com/forums/lime
scrollView is made more for making small windows you can drag up and down to get at other things on it.
I'm not sure if you've already found your own answer or not by now but I'm gonna answer it anyways.
In Lua using Corona SDK, there's a piece of code here at ANSCANA Comunity:
Corona SDK-Lua ScrollView
It is a scrollview code in Lua, but I want a Horizontal one, which implies that one page must be twice the size even for an Android app, which I am making ;P
Hope this help :D

Resources