@@ -2,9 +2,9 @@ import UIKit
22import Alamofire
33import CoreLocation
44
5- class PCALookupViewController : UIViewController , UITableViewDataSource , UITableViewDelegate {
5+ public class PCALookupViewController : UIViewController , UITableViewDataSource , UITableViewDelegate {
66
7- init ( licenseKey: String ) {
7+ public init ( licenseKey: String ) {
88 self . key = licenseKey;
99 super. init ( nibName: " PCALookupView " , bundle: nil )
1010 }
@@ -89,15 +89,15 @@ class PCALookupViewController: UIViewController, UITableViewDataSource, UITableV
8989 }
9090
9191
92- required init ? ( coder aDecoder: NSCoder ) {
92+ required public init ? ( coder aDecoder: NSCoder ) {
9393 fatalError ( " init(coder:) has not been implemented " )
9494 }
9595
9696
9797 var manager : Alamofire . SessionManager ? = nil ;
9898 let locationManager = CLLocationManager ( )
9999
100- override func viewDidLoad( ) {
100+ override public func viewDidLoad( ) {
101101 super. viewDidLoad ( )
102102
103103 if let bgColor = self . addressDelegate? . pca_backgroundColor ? ( ) {
@@ -119,16 +119,15 @@ class PCALookupViewController: UIViewController, UITableViewDataSource, UITableV
119119 searchField. becomeFirstResponder ( )
120120 }
121121
122- var addressDelegate : PCALookupViewDelegate ?
123-
122+ public var addressDelegate : PCALookupViewDelegate ?
124123
125124
126125 var currentResponse : FindResponse ? = nil ;
127126 var currentItem : FindResponseItem ? = nil ;
128127 var lastText : String ? = nil ;
129128
130129
131- func isValid( ) -> Bool {
130+ public func isValid( ) -> Bool {
132131 //TODO -- Check for errors - no credit, bad key, no network connection etc
133132
134133 if !Reachability. isInternetAvailable ( ) {
@@ -220,17 +219,17 @@ class PCALookupViewController: UIViewController, UITableViewDataSource, UITableV
220219
221220 }
222221
223- override func didReceiveMemoryWarning( ) {
222+ override public func didReceiveMemoryWarning( ) {
224223 super. didReceiveMemoryWarning ( )
225224 // Dispose of any resources that can be recreated.
226225 }
227226
228227
229- func tableView( _ tableView: UITableView , numberOfRowsInSection section: Int ) -> Int {
228+ public func tableView( _ tableView: UITableView , numberOfRowsInSection section: Int ) -> Int {
230229 return self . currentResponse? . Items? . count ?? 0 ;
231230 }
232231
233- func tableView( _ tableView: UITableView , cellForRowAt indexPath: IndexPath ) -> UITableViewCell {
232+ public func tableView( _ tableView: UITableView , cellForRowAt indexPath: IndexPath ) -> UITableViewCell {
234233
235234 if let currentItem = self . currentResponse? . Items ? [ indexPath. item] {
236235
@@ -254,7 +253,7 @@ class PCALookupViewController: UIViewController, UITableViewDataSource, UITableV
254253 return UITableViewCell ( style: . subtitle, reuseIdentifier: " " ) ;
255254 }
256255
257- func tableView( _ tableView: UITableView , didSelectRowAt indexPath: IndexPath ) {
256+ public func tableView( _ tableView: UITableView , didSelectRowAt indexPath: IndexPath ) {
258257 currentItem = self . currentResponse? . Items ? [ indexPath. item] ;
259258 if ( currentItem? . ItemType == " Address " ) {
260259 MakeRetrieveRequest ( id: ( currentItem? . Id) !)
0 commit comments