     
     // MARK: - Localization
     
-    private let frameworkBundle : NSBundle = {
-        let mainBundleURL = NSBundle(forClass: self).resourceURL
+    private lazy var frameworkBundle : NSBundle = {
+        let mainBundleURL = NSBundle(forClass: self as! AnyClass).resourceURL!
         let frameworkBundleURL = mainBundleURL.URLByAppendingPathComponent("FDTakeResources.bundle")
-        let frameworkBundle = NSBundle(path: frameworkBundleURL)
+        let frameworkBundle = NSBundle(URL: frameworkBundleURL)
         return frameworkBundle ?? NSBundle.mainBundle()
     }()
     

import MobileCoreServices
import UIKit

public protocol FDTakeDelegate: NSObject {
    /// Delegate method after the user has started a take operation but cancelled it
    optional func takeController(controller: FDTakeController, didCancelAfterAttempting madeAttempt: Bool)

    /// Delegate method after the user has started a take operation but it failed
    optional func takeController(controller: FDTakeController, didFailAfterAttempting madeAttempt: Bool)

    /// Delegate method after the user has successfully taken or selected a photo
    optional func takeController(controller: FDTakeController, gotPhoto photo: UIImage, withInfo info: [NSObject : AnyObject])

    /// Delegate method after the user has successfully taken or selected a video
    optional func takeController(controller: FDTakeController, gotVideo video: NSURL, withInfo info: [NSObject : AnyObject])
}

public class FDTakeController: NSObject /*, UIImagePickerControllerDelegate, UINavigationControllerDelegate */ {

    // MARK: - Properties
    
    /// The delegate to receive updates from FDTake
    public weak var delegate: FDTakeDelegate? = nil
    
    public var allowPhoto = true
    

    private let kNoSourcesKey: String = "noSources"
    
    private let kStringsTableName: String = "FDTake"
    
    
    // MARK: - Private
    
    private var sources = [UIImagePickerControllerSourceType]()
    
    private var buttonTitles = [String]()
