Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panels Programmatically #13

Open
mmdock opened this issue Feb 3, 2019 · 8 comments
Open

Panels Programmatically #13

mmdock opened this issue Feb 3, 2019 · 8 comments
Labels
enhancement New feature or request

Comments

@mmdock
Copy link

mmdock commented Feb 3, 2019

Is there a way to build Panels without the need for Storyboard?

@antoniocasero
Copy link
Owner

Of course, as long your VC conforms the protocol Panelable, you can inject it to the method 'show'.

@antoniocasero
Copy link
Owner

but I'm working to make Panelable nicer :)

@Savyalov
Copy link

"Trying to instantiate something that does not conform Panelable :("

import UIKit
import AVFoundation
import Panels

class ViewController12: UIViewController, Panelable {
@IBOutlet var headerHeight: NSLayoutConstraint!
@IBOutlet var headerPanel: UIView!
}
My storyboard name is "Main". Help me, I do not understand what the problem is. Thank!

@antoniocasero
Copy link
Owner

Hi @Savyalov, sorry for the late response. Are you still having problems? There is an extension included in the framework to instantiate Panels from the storyboard, maybe it helps.

@Savyalov
Copy link

Thank! Already figured out.

@erniela
Copy link

erniela commented Jun 4, 2019

Thank! Already figured out.

What was your solution? I have the same problem doing programmatically. Please help.

@Savyalov
Copy link

Savyalov commented Jun 4, 2019

Good morning! I just deleted and installed again Panelable. Nothing else helped.

@antoniocasero antoniocasero added the enhancement New feature or request label Jun 20, 2019
@shchoi82-robotcode
Copy link

shchoi82-robotcode commented Jul 23, 2019

Hi,
I'm trying to implement without storyboard.
Its my code.. what is the problem?

let panelManager = Panels(target: self)
let panelConfiguration = PanelConfiguration(size: .oneThird)
panelManager.show(panel: self, config: panelConfiguration, view: myView)

myVIew is just existing UIView
self is UIController & Panelable

runtime error
EXC_BAD_ACCESS
Panels.swift: 38 Line
parentViewController?.addContainer(container: panel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants