I've been thinking about the following possibility:
I am right now developing an app for displaying a different set of files(could be different formats), and use the content of these files to form 1 single file.
Because UIDocumentInteractionController could show content of formats that otherwise can't be viewed by my app(docx for example), wouldn't it be nice that I capture the modal view displayed by this controller and use it somewhere else?
I am wondering how can I access the content of presented UIDocumentInteractionController and capture it.
Any advice would be nice, thank you.
Screenshot - Maybe I could do a screenshot of presentedViewController.view, but the resolution of captured image isn't ideal - limited to the screen resolution and not high enough to be viewed on a computer monitor.
Related
I'm working on an iOS app and need to place a web view on a view controller...but I only need a certain portion of it to be shown (the title). Does anyone know how to do this? I would REALLY appreciate any help!
Just set the frame size (size where you want to display the title)required for the UIWebView.
Also you definitely can set the UIWebview to whatever size you wish to.
I am developing an application where it will load Power point presentation file in UIWebView and capture the screen of the UIWebView for each page. And I am able to display as images one by one like a presentation.
Targetted platforms are: iOS6, iOS7
(1) Now when I want to display a Power Point document that has slides with multiple layered images/ elements or slides with animation
(2) Ppt files with custom size of slides
are not properly rendered by UIWebView. And hence I am seeing those slides in a different alignment and orientation. Basically not able to display as original images.
I searched in Google, Stack Overflow and even Apple documentation. Nowhere documented that this is not possible. Is there any other approach for loading ppt files where I will not lose any content or alignment?
SlideShark or Key Note are the apps which will display ppts as if original ppt slides.
Follow App Guidelines for UIDocumentInteractionController
Documentation
Sample Code
I think this will help you.
You can check file support using QLPreviewController here.
Maybe this is the wrong place for this (if so, please help guide me where I should ask this). Would it be possible (or even an acceptable iOS practice) to customize:
The screen that shows when a user takes a photo.
The screen that shows when a user accesses their photo library.
Thanks in advance!
Both these screens are provided by the UIImagePickerController class. You can handily customize the screen to take a photo - there's even API for it. You would first set showsCameraControls to NO to prevent the controller from drawing its own controls, then set a value for the cameraOverlayView property to insert your own controls over the camera. Take a look at the UIImagePickerController docs for more.
By contrast, you should not customize the photo library picker - that's a more traditional navigation interface, and Apple hasn't exposed any extra API to customize how it appears. You could (of course) always start poking into the view hierarchy of the controller once it's onscreen, but I think that would be a little more startling to your users than customizing the camera, and is more prone to break if Apple changes the guts of UIImagePickerController.
In my project, i am using UIImagePickerController to allow the user to pick a photo from the iDevice gallery (that is from the saved images, NOT camera)
I would like to present the preview screen as done when picking an image in the native messages app (it has 'cancel/choose button at the bottom)
I tried setting the allowEditing to YES, but the result is 'Move and Scale' which i dont want.
Is there a way to do it, or do i need to create this 'preview' view in my app?
Sorry for the bad news, but the Move and Scale is a view you'll have when setting allowEditing to YES. If you want something else, you'll have to built it by yourself (or to find some open source for it)...
I am developing an iPad app that needs to have multiple image sources, on the device/Photo Albums, remote and some included with the app. Now the ideal situation would be to have a UIPopover controller with 3 tabs for each source. The only problem is I can't seem to figure out how to have a UIImagePicker be in its own tab. What I am trying to do is very similar to Apple's Keynote for iPad. The photo icon's popover has tabs and the far left tab called media for sure has a UIImagePicker in there. I have no idea how they did that, is it possible for me to do something like that? I think the main issue is that the Image Picker is it's own navigation controller and it cannot be pushed on to another navigation controller. Any help would be greatly appreciated!
check out this - https://github.com/key1jp/ELCImagePickerController
you can implement it with custom asset library
The built-in image picker is no good.
Create your own image picker and add it to your navigation controller as a normal view. Start from either the Matt Tuzzolo or the MyImagePicker from the WWDC 2010 sample code. Note that you probably want to add image and video preview - I copied the image viewer from MyImagePicker and added a 'add' or 'remove' button to it, and the same for video.
Your image picking is in two steps, one for selecting the group, and one for selecting the assets within the group. I recommend dividing the first step into a two - if there is only one, then go directly to that group, i.e. when you have found the first group, check whether that group was the last (block stop argument). Then push the right view controller.
Obiously modify the size of the thumbnails also, they are iPhone size now. Adding a line of metadata (icon and duration) looks much nicer and is more informative for video.
I also recommend adding a 'click-and-hold' function for extended information after like 2 seconds.
Handle different sources by creating a protocol which gives you what you want, i.e.
-(BOOL)isImageAtIndex:(NSInteger)index;
-(UIImage*)thumbnailForUndex:(NSInteger)index;
-(void)setSelectedAtIndex:(NSInteger)index;
Creating a source which handles local files, included resources and assets is perfectly possible - I use NSURLs and check on the url scheme.
Are you not using UITabBarController for your tabs? You should be able to add a UIImagePickerController directly to viewControllers. I'm not sure whether that is a supported use of the image picker, though; the documentation only mentions displaying it modally or displaying it in a UIPopoverController.
It's not usually useful to look at an Apple app to find out what you can do with various built-in controls, as Apple allows themselves to use private APIs.