Ready to use “Acknowledgements”/“Licenses”/“Credits” view controller for CocoaPods.
This project is only useful if you use CocoaPods, so let’s assume that you’re indeed using CocoaPods.
- Add
pod 'VTAcknowledgementsViewController'
in yourPodfile
. - Import the
Pods-acknowledgements.plist
file from the generatedPods
folder to your main app project (so you need to runpod install
at least once before using this pod; don’t copy the file itself, just add a reference).
Note: if you know how to import this file automatically, as part of the pod install
process, please let me know.
The VTAcknowledgementsViewController
instance is usually pushed to an existing UINavigationController
.
VTAcknowledgementsViewController *viewController = [VTAcknowledgementsViewController acknowledgementsViewController];
viewController.headerText = NSLocalizedString(@"We love open source software.", nil); // optional
[self.navigationController pushViewController:viewController animated:YES];
If your .plist
file is named something other than Pods-acknowledgements.plist
(e.g. if you’re using fancy build targets), you can initialize the view controller with a custom path.
NSString *path = [[NSBundle mainBundle] pathForResource:@"Pods-MyTarget-acknowledgements" ofType:@"plist"];
VTAcknowledgementsViewController *viewController = [[VTAcknowledgementsViewController alloc] initWithAcknowledgementsPlistPath:path];
VTAcknowledgementsViewController requires iOS 5.0 and above, and uses ARC.
VTAcknowledgementsViewController was created by Vincent Tourraine, with help from our contributors.
VTAcknowledgementsViewController is available under the MIT license. See the LICENSE file for more info.