I'm experiencing consistent crashes under the following scenario:
I load 4 Screens into a TabBar when initializing
I open a 5th screen from within any of those tabs
I switch tabs
When I return to the tab which performed the transition, the app crashes and throws EXC_BAD_ACCESS
I should note that the 5th screen (the one that is opened) is a custom UIViewController which subclasses GKLParallaxPicturesViewController and includes the PM::ScreenModule.
Any ideas? Here's my code for the 5th screen:
class WidgetScreen < GKLParallaxPicturesViewController
include PM::ScreenModule
attr_accessor :widget_info_controller, :table_view
def self.new(args = {})
@widget_info_controller = WidgetInfo.new(nav_bar: false, widget: args[:widget])
cover_photos = ["cover_photos/1.jpeg".uiimage, "cover_photos/2.jpeg".uiimage, "cover_photos/3.jpeg".uiimage]
@table_view = UITableView.alloc.initWithFrame(SugarCube::CoreGraphics.Rect(0,20,320, 0), style:UITableViewStyleGrouped)
@table_view.dataSource, @table_view.delegate = @widget_info_controller, @widget_info_controller
@table_view.setBackgroundView UIView.alloc.init.setBackgroundColor([41,44,53].uicolor)
@table_view.autoresizingMask = UIViewAutoresizingFlexibleHeight
s = self.alloc.initWithImages(cover_photos, andContentView: @table_view)
s.on_create(args)
s
end
def viewDidLoad
super
self.view.setBackgroundColor([41,44,53].uicolor)
self.view_did_load if self.respond_to?(:view_did_load)
end
def viewWillAppear(animated)
super
self.view_will_appear(animated) if self.respond_to?("view_will_appear:")
end
def viewDidAppear(animated)
super
self.view_did_appear(animated) if self.respond_to?("view_did_appear:")
end
def viewWillDisappear(animated)
self.view_will_disappear(animated) if self.respond_to?("view_will_disappear:")
super
end
def viewDidDisappear(animated)
self.view_did_disappear(animated) if self.respond_to?("view_did_disappear:")
super
end
def shouldAutorotateToInterfaceOrientation(orientation)
self.should_rotate(orientation)
end
def shouldAutorotate
self.should_autorotate
end
def willRotateToInterfaceOrientation(orientation, duration:duration)
self.will_rotate(orientation, duration)
end
def didRotateFromInterfaceOrientation(orientation)
self.on_rotate
end
end
The code that opens this screen is just a regular "open" method call. WidgetInfo is a subclass of PM::TableScreen which I'm using as a datasource for the tableview in that screen. Everything in the screen works as it should.
I'm including the custom UIViewController as a static library in my rake file like so:
Hey everybody,
I'm experiencing consistent crashes under the following scenario:
I should note that the 5th screen (the one that is opened) is a custom UIViewController which subclasses GKLParallaxPicturesViewController and includes the PM::ScreenModule.
Any ideas? Here's my code for the 5th screen:
The code that opens this screen is just a regular "open" method call. WidgetInfo is a subclass of PM::TableScreen which I'm using as a datasource for the tableview in that screen. Everything in the screen works as it should.
I'm including the custom UIViewController as a static library in my rake file like so:
Any ideas?
Thanks!