Implementing VFR PDF reader in app - ios

I'm new to programming and am currently working on creating a app to view PDF's for a class project.
I have added the necessary framework and files for VRF reader. I already have a slide out menu that links to different web pages and an about page. On one page I have two buttons and I want each of them to open a different PDF. I am at a loss for how to make those buttons implement the action to open a file and how to differentiate between the two pdf by which button is pressed.
I know that is a big step from where I am at to where I want to be but if anyone could help thanks in advance.

Related

iOS Swift - alert dialog with pages

I want to provide my users an Info-Dialog, where they can click through several parts of information to show them the flow of the application.
How can I implement a UIAlertController that has several pages and where I can move to the next or previous via a button click?
You have to create custom UIViewController. But if you'd like to make it feel like an UIAlertControlleryou can use AlertOnboarding library as a pod.
And here you can find a bunch of walkthrough/onboarding/tutorial libraries for iOS.

Tabbed iOS WebKit Browser with Swift

In short I am trying to build some typical browser functionalities in a Swift iOS app with WKWebViews (WebKit). I already have a functioning browser based on a WKWebView, which already has a menu bar with a URL input, navigation buttons, a share button, page title etc.
What I am struggling with is creating tabs for the browser. At first this seemed trivial as surely WKWebViews would support this in some way. Well, as far as I can tell they do not (looked at and tried multiple tutorials incl. hackingwithswift, Ray Wenderlich etc. + I checked Apple's documentation + stackoverflow)
This is what I have come up with so far:
1) Creating a new tab/opening a new URL should create a new UIView + WKWebView programmatically (I'll have to make a subclass out of my current browser view)
=> this should create a separate thread for each WKWebView/tab according to Apple's documentation
2) I need something like a Collection View (or Stack Views etc.) to store screenshot images of the already open tabs as a preview page of all tabs. The cells should be linked via a delegate to the corresponding WkWebView and they should have a close button to close (= delete) the tabs.
Am I overthinking this? If I go down this path I have to find a way to wire up (and subsequently delete) multiple delegates and views to the Collection View dynamically and I have to store & delete screenshots every time the user interacts with the tabs. It seems VERY messy. But given that Chrome on iOS is based on WebKit as of late, it's obviously doable.
How would you tackle this problem?
PS I didn't include a mockup because you all know how the tabs in Chrome, Safari etc. on iOS look like.
EDIT:
I am just looking for a clean and sensible way to add/remove and show the multiple WKWebViews, which are created by opening new tabs - just like in Chrome for iOS or Safari etc.
Ok, I have solved this today :) I will have a main UIView and then multiple WKWebViews, which can be "zoomed in" in order to enter full screen mode. No need for screenshots etc.

creating an interactive page (videos, photos) for sharing on iOS device

I am building an iOS app, using storyboard. I have created a page where the user can create a page that will then be then published on DropBox and shared between all app users. this page lets you add photos, videos (not yet), and textviews (with scrolling enabled). Until know when the user presses the upload button, a screenshot is taken and uploaded, then views from a table view. but obviously it is just an image, so you can't scroll the textfields to see all the content and if I wanted to add the video support it would not be able to play it. I tried doing research on the internet, but I am a bit confused. Do I have to save all the components (UITextField...) separately, and place them in the same DropBox folder, and then put them all back together? What do you suggest? Is there a way?
Of course you will have to save the data separately...how else would your program know how to create the view? I recommend JSON or XML. Don't ask about how to structure it, that is a different question and one you should think about yourself.

iOS data driven programmatically setting up views and actions ? Looking for advices

New to iOS, I have to make an app that will show photos and videos.
Could be simple, but there's a little bonus.
The app will have to download configuration based on user. ( xml or json )
After downloading this configuration, it will have to download the elements to be shown.
The app will have to show , based on configuration file, views with buttons.
Each button can be used to show another view with buttons or a photo album, or a video, or a pdf.
I don't know where to start.
I tried to search on google but english not being my mother tongue, I think I don't have the right words to search on.
So any advice on how to structure that and how to make it possible ( nothing is impossible ).
I'm not asking for code, but for guidelines.
Regards
English isn't my mother tongue, but most valuable information in English. I would suggest to find informations in books, they are usually with downloadable examples. This can be useful for you.
Also you can try "ios recipes" in google.
Finally, my version of guideline:
Download configuration in applicationDidFinishLoad:withOptions:
Develop classes with view controllers + xib files, for each term(video, photoAlbum, etc.)
NavigationController or TabBarController to navigate between viewControllers. (There are too much examples with it. I like TabBarController, and "Each button can be used to show another view with buttons or a photo album, or a video, or a pdf." - this is too easy with tabBarController, tabs instead of buttons).
Something like that.

use multiple views in an application

I am new to Iphone programming. So please don't mind if I ask some basic questions. :mad:
I want to develop an application where the landing screen will be a login screen and after login application should display a new screen with the list of available categories. And on selecting any category a new screen should appear with the information related to the selected category.
Basically I want to display different screens in the applications and my confusion is how can I make different screens with one .xib file? or should I use different .xib files for each screen. If I use different .xib files for each screen then how should I navigate to different screens.
Please help in solving this confusion.
Thanks in advance
Gaurav
You should definitely use different .xib's for each view. You will end up having a standard view, a table view (probably programatically wrapped in a navigation controller) and a standard view, respectively. Each will also have their own class.
You navigate to different screens by programmatically initializing them. The condition on which they are created varies from screen to screen. For example, your login screen will only create and load a table view for the categories after a successful login. The category screen will only create a detail screen when the user touches a category in the table.
I think your best bet is to pick up an iPhone programming book and do the first few chapters until you feel comfortable with the basics of XCode. The Apple documentation usually contains more than you really need to know and by the sounds of it, you just want to jump in and make a few simple apps.
After that, you can look at the Apple sample code here: http://developer.apple.com/iphone/library/navigation/index.html#section=Resource%20Types&topic=Sample%20Code

Resources