kitasuke / PagingMenuController

Paging view controller with customizable menu in Swift
MIT License
2.5k stars 449 forks source link

why does changing self.view value affects all other tabs content #180

Open Lithium-HD opened 8 years ago

Lithium-HD commented 8 years ago

I have two tabs with different content. one of them shows some labels and buttons. and the other tab contain google map. in the second tab when I'm using this lines of code: (the last line of code)

let camera = GMSCameraPosition.cameraWithLatitude(lat1.doubleValue, longitude: lng1.doubleValue, zoom: 6)
let mapView = GMSMapView.mapWithFrame(CGRectZero, camera: camera)
mapView.myLocationEnabled = true
mapView.delegate = self
self.view = mapView

this affects the first tab content. and both tabs show googlemap. what should I do? (I'm using swift)

kitasuke commented 8 years ago

Can you show me some more codes about usage? Is self.view root view of child view controller or root view controller?

Lithium-HD commented 8 years ago

I've attached three .txt files which includes the codes of main view and two tabs (I just removed unnecessary lines of codes) in the file named: 'detailTab0.txt' I've written self.view = ... to show the googlemaps in that view. but it affects the other tab too. after tapping on tabs title it will show the correct content again but I want the correct content without any tapping! capture

main.txt detailTab1.txt detailTab0.txt