Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 8
Línea 14... Línea 14...
14
    case postcomment
14
    case postcomment
15
}
15
}
Línea 16... Línea 16...
16
 
16
 
-
 
17
 
17
 
18
struct CommentAndRatingPickerView : View {
18
struct CommentAndRatingPickerView : View {
-
 
19
    @Binding var selectedType: CommentAndRatingPickerType
19
    var capsuleModel : CapsuleModel
Línea 20... Línea 20...
20
   
20
    @Binding var selectedType: CommentAndRatingPickerType
Línea 21... Línea 21...
21
    
21
     
22
    
22
    
Línea 95... Línea 95...
95
                            }
95
                            }
96
                            //Spacer()
96
                            //Spacer()
97
                        //}
97
                        //}
98
                    })
98
                    })
Línea -... Línea 99...
-
 
99
                    
-
 
100
                    
99
                    
101
                    
-
 
102
                    Spacer()
-
 
103
                    
100
                    Spacer()
104
                    if  self.capsuleModel.completed == 1 {
101
                    Button(action: {
105
                        Button(action: {
102
                        self.selectedType = .postcomment
106
                            self.selectedType = .postcomment
103
                    }, label: {
107
                        }, label: {
104
                        //VStack(spacing: 0) {
108
                            //VStack(spacing: 0) {
105
                            if( self.selectedType == .postcomment) {
109
                                if( self.selectedType == .postcomment) {
106
                            
110
                                
107
                                Text(Config.LANG_PICKER_POST_COMMENT).tag(2)
111
                                    Text(Config.LANG_PICKER_POST_COMMENT).tag(2)
108
                                .font(Font.custom(Config.FONT_NAME_BOLD, size: Config.FONT_SIZE_PICKER_BUTTONS))
112
                                    .font(Font.custom(Config.FONT_NAME_BOLD, size: Config.FONT_SIZE_PICKER_BUTTONS))
109
                                    .foregroundColor(Color("color_picker_foreground_highlight"))
113
                                        .foregroundColor(Color("color_picker_foreground_highlight"))
110
                                .padding(.top, 8)
114
                                    .padding(.top, 8)
111
                                .padding(.leading, 5)
115
                                    .padding(.leading, 5)
112
                                .padding(.trailing, 5)
116
                                    .padding(.trailing, 5)
113
                                .padding(.bottom, 8)
117
                                    .padding(.bottom, 8)
114
                                .overlay(
118
                                    .overlay(
115
                                    Rectangle()
119
                                        Rectangle()
116
                                    .frame(height: 2)
120
                                        .frame(height: 2)
117
                                    .foregroundColor(Color("color_picker_overlay_highlight"))
121
                                        .foregroundColor(Color("color_picker_overlay_highlight"))
118
                                , alignment: .bottom)
122
                                    , alignment: .bottom)
119
                            } else {
123
                                } else {
120
                                Text(Config.LANG_PICKER_POST_COMMENT).tag(2)
124
                                    Text(Config.LANG_PICKER_POST_COMMENT).tag(2)
121
                                .font(Font.custom(Config.FONT_NAME_REGULAR, size: Config.FONT_SIZE_PICKER_BUTTONS))
125
                                    .font(Font.custom(Config.FONT_NAME_REGULAR, size: Config.FONT_SIZE_PICKER_BUTTONS))
122
                                    .foregroundColor(Color("color_picker_foreground"))
126
                                        .foregroundColor(Color("color_picker_foreground"))
123
                                .padding(.top, 8)
127
                                    .padding(.top, 8)
124
                                .padding(.leading, 5)
128
                                    .padding(.leading, 5)
125
                                .padding(.trailing, 5)
129
                                    .padding(.trailing, 5)
126
                                .padding(.bottom, 8)
130
                                    .padding(.bottom, 8)
127
                               
131
                                   
128
                            }
132
                                }
129
                            //Spacer()
133
                                //Spacer()
130
                        //}
134
                            //}
131
                    })
135
                        })
-
 
136
                        Spacer()
132
                    Spacer()
137
                    }
Línea 142... Línea 147...
142
        }
147
        }
Línea 143... Línea 148...
143
 
148
 
144
    }
149
    }
145
}
150
}
-
 
151
struct CommentAndRatingPickerView_Previews: PreviewProvider {
-
 
152
    
146
struct CommentAndRatingPickerView_Previews: PreviewProvider {
153
    static var capsuleModel : CapsuleModel = CapsuleModel()
-
 
154
    @State static var selectedType : CommentAndRatingPickerType = .introduction
Línea 147... Línea 155...
147
    @State static var selectedType: CommentAndRatingPickerType = .introduction
155
    
148
    
156
    
149
    static var previews: some View {
157
    static var previews: some View {
150
        CommentAndRatingPickerView(selectedType: self.$selectedType)
158
        CommentAndRatingPickerView(capsuleModel: capsuleModel, selectedType: self.$selectedType)