diff --git a/DHBW-Service/Supporting Files/Info.plist b/DHBW-Service/Supporting Files/Info.plist index 11a01b2..3829413 100644 --- a/DHBW-Service/Supporting Files/Info.plist +++ b/DHBW-Service/Supporting Files/Info.plist @@ -6,6 +6,30 @@ $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) + CFBundleIcons + + CFBundleAlternateIcons + + Alpaca-Alt-Icon + + CFBundleIconFiles + + alpaca-alt-icon + + UIPrerenderedIcon + + + + CFBundlePrimaryIcon + + CFBundleIconFiles + + dhbw-standard-icon + + UIPrerenderedIcon + + + CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion @@ -44,29 +68,5 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - dhbw-standard-icon - - UIPrerenderedIcon - - - CFBundleAlternateIcons - - Alpaca-Alt-Icon - - CFBundleIconFiles - - alpaca-alt-icon - - UIPrerenderedIcon - - - - diff --git a/DHBW-Service/Views/Tabs/LecturePlanItem.swift b/DHBW-Service/Views/Tabs/LecturePlanItem.swift index cd355f2..5eae0fa 100644 --- a/DHBW-Service/Views/Tabs/LecturePlanItem.swift +++ b/DHBW-Service/Views/Tabs/LecturePlanItem.swift @@ -14,6 +14,29 @@ struct LecturePlanItem: View { var body: some View { VStack { + VStack { + Text(event.value(forKey: "summary") as! String) + .font(.title3) + .frame(maxWidth: .infinity, alignment: .leading) + HStack { + VStack(alignment: .leading) { + Text("When") + Text("Where") + } + VStack(alignment: .leading) { + Text(getDateAsString(date: event.value(forKey: "startDate") as! Date) ) + .bold() + Text(event.value(forKey: "location") as! String) + .bold() + }.frame(maxWidth: .infinity, alignment: .leading) + } + } + .padding() + .background( + RoundedRectangle(cornerRadius: 10) + .fill(Color.gray) + ) + Spacer() Text(event.value(forKey: "summary") as! String) Button(action: { event.setValue(!isHidden, forKey: "isHidden") @@ -30,6 +53,7 @@ struct LecturePlanItem: View { .foregroundColor(.white) .background(Color.blue) .cornerRadius(15) + Spacer() } .onAppear{ self.isHidden = event.value(forKey: "isHidden") as! Bool @@ -37,6 +61,12 @@ struct LecturePlanItem: View { } } +func getDateAsString(date: Date) -> String { + let formatter = DateFormatter() + formatter.dateStyle = .short + return formatter.string(from: date) +} + struct LecturePlanItem_Previews: PreviewProvider { static var previews: some View { LecturePlanItem(event: getPreviewEvent())