Documentation
¶
Overview ¶
Package ios implements a native ios views.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityIndicator ¶
type ActivityIndicator struct {
}
If any view has an ActivityIndicator option, the spinner will be visible.
return view.Model{
Options: []view.Option{app.ActivityIndicator{}}
}
func (*ActivityIndicator) OptionKey ¶
func (a *ActivityIndicator) OptionKey() string
type ProgressView ¶
type ProgressView struct {
view.Embed
Progress float64
ProgressNotifier comm.Float64Notifier
ProgressColor color.Color
PaintStyle *paint.Style
// contains filtered or unexported fields
}
ProgressView implements a progess view.
func (*ProgressView) Build ¶
func (v *ProgressView) Build(ctx view.Context) view.Model
Build implements the view.View interface.
func (*ProgressView) Lifecycle ¶
func (v *ProgressView) Lifecycle(from, to view.Stage)
Lifecycle implements the view.View interface.
type SegmentView ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Stack represents a list of views to be shown in the StackView. It can be manipulated outside of a Build() call.
type StackBar ¶
type StackView ¶
type StackView struct {
view.Embed
Stack *Stack
TitleTextStyle *text.Style
BackTextStyle *text.Style
BarColor color.Color
// contains filtered or unexported fields
}
Building a simple StackView:
type AppView struct {
view.Embed
stack *ios.Stack
}
func NewAppView() *AppView {
child := view.NewBasicView()
child.Painter = &paint.Style{BackgroundColor: colornames.Red}
appview := &AppView{
stack: &ios.Stack{},
}
appview.stack.SetViews(child)
return appview
}
func (v *AppView) Build(ctx view.Context) view.Model {
child := ios.New()
child.Stack = v.stack
return view.Model{
Children: []view.View{child},
}
}
Modifying the stack:
child := view.NewBasicView()
child.Painter = &paint.Style{BackgroundColor: colornames.Green}
v.Stack.Push(child)
type StatusBar ¶
type StatusBar struct {
Hidden bool
Style StatusBarStyle
}
If multiple views have a statusBar, the most recently mounted one will be used. UIViewControllerBasedStatusBarAppearance must be set to False in the app's Info.plist to use this component.
return view.Model{
Options: []view.Option{
&ios.StatusBar{ Style: ios.StatusBarStyleLight },
},
}
type StatusBarStyle ¶
type StatusBarStyle int
const ( // Statusbar with light icons StatusBarStyleLight StatusBarStyle = iota // Statusbar with dark icons StatusBarStyleDark )
type TabView ¶
type TabView struct {
view.Embed
Tabs *Tabs
BarColor color.Color
SelectedTextStyle *text.Style
UnselectedTextStyle *text.Style
SelectedColor color.Color
UnselectedColor color.Color
// contains filtered or unexported fields
}
type Tabs ¶
type Tabs struct {
// contains filtered or unexported fields
}
Tabs represents a list of views to be shown in the TabView. It can be manipulated outside of a Build() call.
func (*Tabs) SelectedIndex ¶
SelectedIndex returns the index of the selected tab.
func (*Tabs) SelectedView ¶
func (*Tabs) SetSelectedIndex ¶
SetSelectedIndex selects the tab at idx.