How to access the UIView from a UIActivity custom object? - uiactivity

I am using UIActivityViewController with custom activities and I want to do access the view of the activity that was selected. Is there any way to do this ?
According to Apple there is activityImage for accessing the UIImage but nothing for the view.

As stated by Apple is not yet available
https://forums.developer.apple.com/message/86293
I filed an enhancement ticket #23496617

Related

Subclassing UIAlertController

With pre-iOS 8 we had to use the UIAlertView and UIActionSheet
Which we weren't allowed to mess with the view hierarchy or subclass on either them.
UIAlertView Documentation
The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.
UIActionSheet Documentation
UIActionSheet is not designed to be subclassed, nor should you add views to its hierarchy. If you need to present a sheet with more customization than provided by the UIActionSheet API, you can create your own and present it modally with presentViewController:animated:completion:.
However with iOS8 Apple have introduced UIAlertController to replace both UIAlertView and UIActionSheet (Check the pre-release documentation here).
So in this pre-release documentation there is nothing about not being able to subclass or change the view heirarchy, it even has this method addTextFieldWithConfigurationHandler: so will we be able to change the view heirarchy and/or subclass UIAlertController without worrying whether Apple will approve or reject our applications?
It's a late response, but directly from Apple docs.
The UIAlertController class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.
So, you shouldn't subclass UIAlertController.
This answer is outdated. Please refer to limon's answer.
ViewController != View. Apple's policy of not changing the appearance of an UIAlertView does not affect the presenting view controller. I see no reason why you shouldn't be able to subclass the UIAlertController. But using it may be making it harder to replace the alert view with something custom grown, as the alert view is now only created indirectly by classes out of your control. And for UIAlertView same rules applies as before.

Cocoa Finder app List view

Being a starter in Cocoa Programming, I would like to know using the existing NSTableView can one be able to achieve Disclosure Button? Or one has to follow NSOutlineview?
From the above picture, on selecting the list view and getting a Folder[Super view] and getting the children using a Disclosure button
Also can a registered Mac Developer get Finder app's sample code?
Thanks
NSOutlineView is just a subclass of NSTableView, so yes just use NSOutlineView to use the disclosure button.
Check out the docs for how to use it.
And no, Apple never released the source code for Finder.

Create custom animated segue with images?

I am trying to build a custom segue for an iOS app that utilizes images on the top and bottom of the screen (like a header and footer) that will slide up/down (out), transition to the next page, then slide back in. I found a simple tutorial that does the animation that I would like to use, but I am stuck trying to implement it into a segue.
Is this possible? If so, how? I have barely found any documentation on what I would like to do, and I am royally stuck!
Thanks in advance.
Animation tutorial: http://www.raywenderlich.com/2454/how-to-use-uiview-animation-tutorial
iOS 7
What you're asking about is possible with new APIs. However, iOS 7 is currently under NDA. Please avoid asking iOS 7 related questions on Stack Overflow until the SDK, Toolchain, and OS go final. Ask this question on the iOS Developer Forums. When iOS 7 becomes public, I'll edit this answer to describe how to do it.
Meanwhile (since you're a registered developer), I can point you to a few resources that may be of interest (you may need to sign in to access them).
WWDC Videos
The video titled Building User Interfaces for iOS 7 introduces the new Segue animations and techniques. The part of interest is around the 18:30 minute mark.
The video titled Custom Transitions using View Controllers goes in depth to explain the new custom animated segues and how to use them.
Creating Custom Segues - Pre-release documentation
Posts about Segue's on the Dev Forums - Just search the Developer Forums
iOS 5 - 6
Creating custom segues in earlier versions of iOS (5.0 and up) is fairly straightforward, unlike iOS 7 - the animations can't really interact with views within your ViewController and they aren't as dynamic.
To setup a custom segue, you'll need to first create a subclass of uistoryboardsegue (Documentation Here). Override the perform method and add your own animation and drawing code:
- (void)perform {
//Add your own animation code here, then present the View Controller using that custom animation
[[self sourceViewController] presentModalViewController:[self destinationViewController] animated:NO];
}
Now that you've subclassed UIStoryboardSegue and created your own animation, you'll need to connect the segue in Interface Builder.
Create the Segue by Control-Dragging from the source view controller to the destination view controller.
Select custom from the list
Name the Segue by setting its Identifier (this way you can also call the segue using the performSegueWithIdentifier:sender:) method. Then set the Segue Class to the name of your UIStoryboardSegue subclass.

How to write UIView to a projector?

How do I write a UIView to a projector that can work off the iPhone?
You can use the UIScreen class to present content on an external display (including a projector). You'll need to create a new UIWindow. Here is some relevant sample code from Apple as well.

Add additional UIImage to TTPhotoViewController

I am using the Three20 framework to implement a photo viewer. However, I also intend to customize it by doing the following:
1) Add a profile photo on top of each photo displayed and add some text to it (I assume I have to add a subview)
2) Add additional buttons on the side of the photo to allow users to delete or star the photo.
I have looked into the code for TTPhotoViewController but am not sure the place where I can make all these customizations. Do I make the changes to a subclass of photo view? And where exactly in photo view can I do it?
First you have to subclass TTPhotoViewController (see the sample code in TTCatalog). Then make a subclass of TTPhotoView. In this subclass there are a lot of points, where you can add another Image or Label to the PhotoView. I just tested adding a new Label inside the
- (void)showCaption:(NSString*)caption
method and it worked great.
The next step is to override the following method.
- (TTPhotoView*)createPhotoView {
return [[[TTPhotoView alloc] init] autorelease];
}
In this method you can just alloc, init and autrelease your own subclass of TTPhotoView. This way the photo shown in the TTPhotoViewController will be your own custom photo.
I think my answer is a little bit confusing. If you need additional help, just post a comment.