├── ChatUI.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── iamshezad.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── iamshezad.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── ChatUI ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── Afna.imageset │ │ ├── Contents.json │ │ └── Image.png │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Catherine.imageset │ │ ├── Contents.json │ │ └── Image 2.png │ ├── Contents.json │ ├── Jerin.imageset │ │ ├── Contents.json │ │ └── Image 3.png │ ├── Mathew.imageset │ │ ├── Contents.json │ │ └── Image 4.png │ ├── Shezad.imageset │ │ ├── Contents.json │ │ └── IMG_9097.png │ ├── color_bg.colorset │ │ └── Contents.json │ ├── color_bg_inverted.colorset │ │ └── Contents.json │ └── color_primary.colorset │ │ └── Contents.json ├── ChatUIApp.swift ├── Info.plist ├── Module │ ├── Calls │ │ ├── CallItem.swift │ │ └── CallListView.swift │ ├── Chats │ │ ├── ChatItem.swift │ │ ├── ChatListView.swift │ │ └── OnlineUserView.swift │ ├── Contacts │ │ ├── ContactItem.swift │ │ └── ContactsView.swift │ ├── ContentView.swift │ ├── SearchView.swift │ └── Settings │ │ ├── SettingsHeaderItem.swift │ │ ├── SettingsItem.swift │ │ └── SettingsView.swift └── Preview Content │ └── Preview Assets.xcassets │ └── Contents.json ├── LICENSE ├── README.md └── Resources └── Main-screenshot.png /ChatUI.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0C41FA3A26BE725E0083B868 /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C41FA3926BE725E0083B868 /* SearchView.swift */; }; 11 | 0C4DEFCA26C269FF008C5F34 /* ChatItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C4DEFC926C269FF008C5F34 /* ChatItem.swift */; }; 12 | 0C4DEFCC26C26A2C008C5F34 /* OnlineUserView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C4DEFCB26C26A2C008C5F34 /* OnlineUserView.swift */; }; 13 | 0C4DEFD126C26AC0008C5F34 /* CallItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C4DEFD026C26AC0008C5F34 /* CallItem.swift */; }; 14 | 0C4DEFD326C26B0C008C5F34 /* ContactItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C4DEFD226C26B0C008C5F34 /* ContactItem.swift */; }; 15 | 0C4DEFD526C26B3A008C5F34 /* SettingsItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C4DEFD426C26B3A008C5F34 /* SettingsItem.swift */; }; 16 | 0C4DEFD726C26B57008C5F34 /* SettingsHeaderItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C4DEFD626C26B57008C5F34 /* SettingsHeaderItem.swift */; }; 17 | 0C6EBA5B26B9AA4900E51325 /* ChatUIApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C6EBA5A26B9AA4900E51325 /* ChatUIApp.swift */; }; 18 | 0C6EBA5D26B9AA4900E51325 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C6EBA5C26B9AA4900E51325 /* ContentView.swift */; }; 19 | 0C6EBA5F26B9AA4E00E51325 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0C6EBA5E26B9AA4E00E51325 /* Assets.xcassets */; }; 20 | 0C6EBA6226B9AA4E00E51325 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0C6EBA6126B9AA4E00E51325 /* Preview Assets.xcassets */; }; 21 | 0CF69BBD26BC05F10081AC6B /* ChatListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CF69BBC26BC05F10081AC6B /* ChatListView.swift */; }; 22 | 0CF69BBF26BC0B830081AC6B /* CallListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CF69BBE26BC0B830081AC6B /* CallListView.swift */; }; 23 | 0CF69BC126BC0B910081AC6B /* ContactsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CF69BC026BC0B910081AC6B /* ContactsView.swift */; }; 24 | 0CF69BC326BC0B9C0081AC6B /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CF69BC226BC0B9C0081AC6B /* SettingsView.swift */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | 0C41FA3926BE725E0083B868 /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = ""; }; 29 | 0C4DEFC926C269FF008C5F34 /* ChatItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatItem.swift; sourceTree = ""; }; 30 | 0C4DEFCB26C26A2C008C5F34 /* OnlineUserView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnlineUserView.swift; sourceTree = ""; }; 31 | 0C4DEFD026C26AC0008C5F34 /* CallItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallItem.swift; sourceTree = ""; }; 32 | 0C4DEFD226C26B0C008C5F34 /* ContactItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactItem.swift; sourceTree = ""; }; 33 | 0C4DEFD426C26B3A008C5F34 /* SettingsItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsItem.swift; sourceTree = ""; }; 34 | 0C4DEFD626C26B57008C5F34 /* SettingsHeaderItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsHeaderItem.swift; sourceTree = ""; }; 35 | 0C6EBA5726B9AA4900E51325 /* ChatUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChatUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 0C6EBA5A26B9AA4900E51325 /* ChatUIApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatUIApp.swift; sourceTree = ""; }; 37 | 0C6EBA5C26B9AA4900E51325 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 38 | 0C6EBA5E26B9AA4E00E51325 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 39 | 0C6EBA6126B9AA4E00E51325 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 40 | 0C6EBA6326B9AA4E00E51325 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | 0CF69BBC26BC05F10081AC6B /* ChatListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatListView.swift; sourceTree = ""; }; 42 | 0CF69BBE26BC0B830081AC6B /* CallListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallListView.swift; sourceTree = ""; }; 43 | 0CF69BC026BC0B910081AC6B /* ContactsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsView.swift; sourceTree = ""; }; 44 | 0CF69BC226BC0B9C0081AC6B /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 0C6EBA5426B9AA4800E51325 /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 0C4DEFC726C26976008C5F34 /* Module */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 0C4DEFCF26C26A9B008C5F34 /* Settings */, 62 | 0C4DEFCE26C26A8F008C5F34 /* Contacts */, 63 | 0C4DEFCD26C26A84008C5F34 /* Calls */, 64 | 0C4DEFC826C26982008C5F34 /* Chats */, 65 | 0C6EBA5C26B9AA4900E51325 /* ContentView.swift */, 66 | 0C41FA3926BE725E0083B868 /* SearchView.swift */, 67 | ); 68 | path = Module; 69 | sourceTree = ""; 70 | }; 71 | 0C4DEFC826C26982008C5F34 /* Chats */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 0CF69BBC26BC05F10081AC6B /* ChatListView.swift */, 75 | 0C4DEFC926C269FF008C5F34 /* ChatItem.swift */, 76 | 0C4DEFCB26C26A2C008C5F34 /* OnlineUserView.swift */, 77 | ); 78 | path = Chats; 79 | sourceTree = ""; 80 | }; 81 | 0C4DEFCD26C26A84008C5F34 /* Calls */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 0CF69BBE26BC0B830081AC6B /* CallListView.swift */, 85 | 0C4DEFD026C26AC0008C5F34 /* CallItem.swift */, 86 | ); 87 | path = Calls; 88 | sourceTree = ""; 89 | }; 90 | 0C4DEFCE26C26A8F008C5F34 /* Contacts */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 0CF69BC026BC0B910081AC6B /* ContactsView.swift */, 94 | 0C4DEFD226C26B0C008C5F34 /* ContactItem.swift */, 95 | ); 96 | path = Contacts; 97 | sourceTree = ""; 98 | }; 99 | 0C4DEFCF26C26A9B008C5F34 /* Settings */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 0CF69BC226BC0B9C0081AC6B /* SettingsView.swift */, 103 | 0C4DEFD426C26B3A008C5F34 /* SettingsItem.swift */, 104 | 0C4DEFD626C26B57008C5F34 /* SettingsHeaderItem.swift */, 105 | ); 106 | path = Settings; 107 | sourceTree = ""; 108 | }; 109 | 0C6EBA4E26B9AA4800E51325 = { 110 | isa = PBXGroup; 111 | children = ( 112 | 0C6EBA5926B9AA4900E51325 /* ChatUI */, 113 | 0C6EBA5826B9AA4900E51325 /* Products */, 114 | ); 115 | sourceTree = ""; 116 | }; 117 | 0C6EBA5826B9AA4900E51325 /* Products */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 0C6EBA5726B9AA4900E51325 /* ChatUI.app */, 121 | ); 122 | name = Products; 123 | sourceTree = ""; 124 | }; 125 | 0C6EBA5926B9AA4900E51325 /* ChatUI */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 0C4DEFC726C26976008C5F34 /* Module */, 129 | 0C6EBA5A26B9AA4900E51325 /* ChatUIApp.swift */, 130 | 0C6EBA5E26B9AA4E00E51325 /* Assets.xcassets */, 131 | 0C6EBA6326B9AA4E00E51325 /* Info.plist */, 132 | 0C6EBA6026B9AA4E00E51325 /* Preview Content */, 133 | ); 134 | path = ChatUI; 135 | sourceTree = ""; 136 | }; 137 | 0C6EBA6026B9AA4E00E51325 /* Preview Content */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 0C6EBA6126B9AA4E00E51325 /* Preview Assets.xcassets */, 141 | ); 142 | path = "Preview Content"; 143 | sourceTree = ""; 144 | }; 145 | /* End PBXGroup section */ 146 | 147 | /* Begin PBXNativeTarget section */ 148 | 0C6EBA5626B9AA4800E51325 /* ChatUI */ = { 149 | isa = PBXNativeTarget; 150 | buildConfigurationList = 0C6EBA6626B9AA4E00E51325 /* Build configuration list for PBXNativeTarget "ChatUI" */; 151 | buildPhases = ( 152 | 0C6EBA5326B9AA4800E51325 /* Sources */, 153 | 0C6EBA5426B9AA4800E51325 /* Frameworks */, 154 | 0C6EBA5526B9AA4800E51325 /* Resources */, 155 | ); 156 | buildRules = ( 157 | ); 158 | dependencies = ( 159 | ); 160 | name = ChatUI; 161 | productName = ChatUI; 162 | productReference = 0C6EBA5726B9AA4900E51325 /* ChatUI.app */; 163 | productType = "com.apple.product-type.application"; 164 | }; 165 | /* End PBXNativeTarget section */ 166 | 167 | /* Begin PBXProject section */ 168 | 0C6EBA4F26B9AA4800E51325 /* Project object */ = { 169 | isa = PBXProject; 170 | attributes = { 171 | LastSwiftUpdateCheck = 1250; 172 | LastUpgradeCheck = 1250; 173 | TargetAttributes = { 174 | 0C6EBA5626B9AA4800E51325 = { 175 | CreatedOnToolsVersion = 12.5; 176 | }; 177 | }; 178 | }; 179 | buildConfigurationList = 0C6EBA5226B9AA4800E51325 /* Build configuration list for PBXProject "ChatUI" */; 180 | compatibilityVersion = "Xcode 9.3"; 181 | developmentRegion = en; 182 | hasScannedForEncodings = 0; 183 | knownRegions = ( 184 | en, 185 | Base, 186 | ); 187 | mainGroup = 0C6EBA4E26B9AA4800E51325; 188 | productRefGroup = 0C6EBA5826B9AA4900E51325 /* Products */; 189 | projectDirPath = ""; 190 | projectRoot = ""; 191 | targets = ( 192 | 0C6EBA5626B9AA4800E51325 /* ChatUI */, 193 | ); 194 | }; 195 | /* End PBXProject section */ 196 | 197 | /* Begin PBXResourcesBuildPhase section */ 198 | 0C6EBA5526B9AA4800E51325 /* Resources */ = { 199 | isa = PBXResourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 0C6EBA6226B9AA4E00E51325 /* Preview Assets.xcassets in Resources */, 203 | 0C6EBA5F26B9AA4E00E51325 /* Assets.xcassets in Resources */, 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | /* End PBXResourcesBuildPhase section */ 208 | 209 | /* Begin PBXSourcesBuildPhase section */ 210 | 0C6EBA5326B9AA4800E51325 /* Sources */ = { 211 | isa = PBXSourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | 0C4DEFCA26C269FF008C5F34 /* ChatItem.swift in Sources */, 215 | 0CF69BBF26BC0B830081AC6B /* CallListView.swift in Sources */, 216 | 0C4DEFD726C26B57008C5F34 /* SettingsHeaderItem.swift in Sources */, 217 | 0C6EBA5D26B9AA4900E51325 /* ContentView.swift in Sources */, 218 | 0CF69BBD26BC05F10081AC6B /* ChatListView.swift in Sources */, 219 | 0C4DEFD326C26B0C008C5F34 /* ContactItem.swift in Sources */, 220 | 0C4DEFD526C26B3A008C5F34 /* SettingsItem.swift in Sources */, 221 | 0C41FA3A26BE725E0083B868 /* SearchView.swift in Sources */, 222 | 0CF69BC326BC0B9C0081AC6B /* SettingsView.swift in Sources */, 223 | 0C4DEFD126C26AC0008C5F34 /* CallItem.swift in Sources */, 224 | 0C4DEFCC26C26A2C008C5F34 /* OnlineUserView.swift in Sources */, 225 | 0CF69BC126BC0B910081AC6B /* ContactsView.swift in Sources */, 226 | 0C6EBA5B26B9AA4900E51325 /* ChatUIApp.swift in Sources */, 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | }; 230 | /* End PBXSourcesBuildPhase section */ 231 | 232 | /* Begin XCBuildConfiguration section */ 233 | 0C6EBA6426B9AA4E00E51325 /* Debug */ = { 234 | isa = XCBuildConfiguration; 235 | buildSettings = { 236 | ALWAYS_SEARCH_USER_PATHS = NO; 237 | CLANG_ANALYZER_NONNULL = YES; 238 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_ENABLE_OBJC_WEAK = YES; 244 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 245 | CLANG_WARN_BOOL_CONVERSION = YES; 246 | CLANG_WARN_COMMA = YES; 247 | CLANG_WARN_CONSTANT_CONVERSION = YES; 248 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 249 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 250 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 251 | CLANG_WARN_EMPTY_BODY = YES; 252 | CLANG_WARN_ENUM_CONVERSION = YES; 253 | CLANG_WARN_INFINITE_RECURSION = YES; 254 | CLANG_WARN_INT_CONVERSION = YES; 255 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 257 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 258 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 259 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 260 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 261 | CLANG_WARN_STRICT_PROTOTYPES = YES; 262 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 263 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 264 | CLANG_WARN_UNREACHABLE_CODE = YES; 265 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 266 | COPY_PHASE_STRIP = NO; 267 | DEBUG_INFORMATION_FORMAT = dwarf; 268 | ENABLE_STRICT_OBJC_MSGSEND = YES; 269 | ENABLE_TESTABILITY = YES; 270 | GCC_C_LANGUAGE_STANDARD = gnu11; 271 | GCC_DYNAMIC_NO_PIC = NO; 272 | GCC_NO_COMMON_BLOCKS = YES; 273 | GCC_OPTIMIZATION_LEVEL = 0; 274 | GCC_PREPROCESSOR_DEFINITIONS = ( 275 | "DEBUG=1", 276 | "$(inherited)", 277 | ); 278 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 279 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 280 | GCC_WARN_UNDECLARED_SELECTOR = YES; 281 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 282 | GCC_WARN_UNUSED_FUNCTION = YES; 283 | GCC_WARN_UNUSED_VARIABLE = YES; 284 | IPHONEOS_DEPLOYMENT_TARGET = 14.5; 285 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 286 | MTL_FAST_MATH = YES; 287 | ONLY_ACTIVE_ARCH = YES; 288 | SDKROOT = iphoneos; 289 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 290 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 291 | }; 292 | name = Debug; 293 | }; 294 | 0C6EBA6526B9AA4E00E51325 /* Release */ = { 295 | isa = XCBuildConfiguration; 296 | buildSettings = { 297 | ALWAYS_SEARCH_USER_PATHS = NO; 298 | CLANG_ANALYZER_NONNULL = YES; 299 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 300 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 301 | CLANG_CXX_LIBRARY = "libc++"; 302 | CLANG_ENABLE_MODULES = YES; 303 | CLANG_ENABLE_OBJC_ARC = YES; 304 | CLANG_ENABLE_OBJC_WEAK = YES; 305 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 306 | CLANG_WARN_BOOL_CONVERSION = YES; 307 | CLANG_WARN_COMMA = YES; 308 | CLANG_WARN_CONSTANT_CONVERSION = YES; 309 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 310 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 311 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 312 | CLANG_WARN_EMPTY_BODY = YES; 313 | CLANG_WARN_ENUM_CONVERSION = YES; 314 | CLANG_WARN_INFINITE_RECURSION = YES; 315 | CLANG_WARN_INT_CONVERSION = YES; 316 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 317 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 318 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 319 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 320 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 321 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 322 | CLANG_WARN_STRICT_PROTOTYPES = YES; 323 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 324 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 325 | CLANG_WARN_UNREACHABLE_CODE = YES; 326 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 327 | COPY_PHASE_STRIP = NO; 328 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 329 | ENABLE_NS_ASSERTIONS = NO; 330 | ENABLE_STRICT_OBJC_MSGSEND = YES; 331 | GCC_C_LANGUAGE_STANDARD = gnu11; 332 | GCC_NO_COMMON_BLOCKS = YES; 333 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 334 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 335 | GCC_WARN_UNDECLARED_SELECTOR = YES; 336 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 337 | GCC_WARN_UNUSED_FUNCTION = YES; 338 | GCC_WARN_UNUSED_VARIABLE = YES; 339 | IPHONEOS_DEPLOYMENT_TARGET = 14.5; 340 | MTL_ENABLE_DEBUG_INFO = NO; 341 | MTL_FAST_MATH = YES; 342 | SDKROOT = iphoneos; 343 | SWIFT_COMPILATION_MODE = wholemodule; 344 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 345 | VALIDATE_PRODUCT = YES; 346 | }; 347 | name = Release; 348 | }; 349 | 0C6EBA6726B9AA4E00E51325 /* Debug */ = { 350 | isa = XCBuildConfiguration; 351 | buildSettings = { 352 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 353 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 354 | CODE_SIGN_STYLE = Manual; 355 | DEVELOPMENT_ASSET_PATHS = "\"ChatUI/Preview Content\""; 356 | DEVELOPMENT_TEAM = ""; 357 | ENABLE_PREVIEWS = YES; 358 | INFOPLIST_FILE = ChatUI/Info.plist; 359 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 360 | LD_RUNPATH_SEARCH_PATHS = ( 361 | "$(inherited)", 362 | "@executable_path/Frameworks", 363 | ); 364 | PRODUCT_BUNDLE_IDENTIFIER = com.iamshezad.ChatUI; 365 | PRODUCT_NAME = "$(TARGET_NAME)"; 366 | PROVISIONING_PROFILE_SPECIFIER = ""; 367 | SWIFT_VERSION = 5.0; 368 | TARGETED_DEVICE_FAMILY = 1; 369 | }; 370 | name = Debug; 371 | }; 372 | 0C6EBA6826B9AA4E00E51325 /* Release */ = { 373 | isa = XCBuildConfiguration; 374 | buildSettings = { 375 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 376 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 377 | CODE_SIGN_STYLE = Manual; 378 | DEVELOPMENT_ASSET_PATHS = "\"ChatUI/Preview Content\""; 379 | DEVELOPMENT_TEAM = ""; 380 | ENABLE_PREVIEWS = YES; 381 | INFOPLIST_FILE = ChatUI/Info.plist; 382 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 383 | LD_RUNPATH_SEARCH_PATHS = ( 384 | "$(inherited)", 385 | "@executable_path/Frameworks", 386 | ); 387 | PRODUCT_BUNDLE_IDENTIFIER = com.iamshezad.ChatUI; 388 | PRODUCT_NAME = "$(TARGET_NAME)"; 389 | PROVISIONING_PROFILE_SPECIFIER = ""; 390 | SWIFT_VERSION = 5.0; 391 | TARGETED_DEVICE_FAMILY = 1; 392 | }; 393 | name = Release; 394 | }; 395 | /* End XCBuildConfiguration section */ 396 | 397 | /* Begin XCConfigurationList section */ 398 | 0C6EBA5226B9AA4800E51325 /* Build configuration list for PBXProject "ChatUI" */ = { 399 | isa = XCConfigurationList; 400 | buildConfigurations = ( 401 | 0C6EBA6426B9AA4E00E51325 /* Debug */, 402 | 0C6EBA6526B9AA4E00E51325 /* Release */, 403 | ); 404 | defaultConfigurationIsVisible = 0; 405 | defaultConfigurationName = Release; 406 | }; 407 | 0C6EBA6626B9AA4E00E51325 /* Build configuration list for PBXNativeTarget "ChatUI" */ = { 408 | isa = XCConfigurationList; 409 | buildConfigurations = ( 410 | 0C6EBA6726B9AA4E00E51325 /* Debug */, 411 | 0C6EBA6826B9AA4E00E51325 /* Release */, 412 | ); 413 | defaultConfigurationIsVisible = 0; 414 | defaultConfigurationName = Release; 415 | }; 416 | /* End XCConfigurationList section */ 417 | }; 418 | rootObject = 0C6EBA4F26B9AA4800E51325 /* Project object */; 419 | } 420 | -------------------------------------------------------------------------------- /ChatUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ChatUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ChatUI.xcodeproj/project.xcworkspace/xcuserdata/iamshezad.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamshezad/ChatUI/b26d865dde354f116d77a4b4ab169d13b6b1e767/ChatUI.xcodeproj/project.xcworkspace/xcuserdata/iamshezad.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ChatUI.xcodeproj/xcuserdata/iamshezad.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /ChatUI.xcodeproj/xcuserdata/iamshezad.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ChatUI.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Afna.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Image.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Afna.imageset/Image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamshezad/ChatUI/b26d865dde354f116d77a4b4ab169d13b6b1e767/ChatUI/Assets.xcassets/Afna.imageset/Image.png -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Catherine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Image 2.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Catherine.imageset/Image 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamshezad/ChatUI/b26d865dde354f116d77a4b4ab169d13b6b1e767/ChatUI/Assets.xcassets/Catherine.imageset/Image 2.png -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Jerin.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Image 3.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Jerin.imageset/Image 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamshezad/ChatUI/b26d865dde354f116d77a4b4ab169d13b6b1e767/ChatUI/Assets.xcassets/Jerin.imageset/Image 3.png -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Mathew.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Image 4.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Mathew.imageset/Image 4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamshezad/ChatUI/b26d865dde354f116d77a4b4ab169d13b6b1e767/ChatUI/Assets.xcassets/Mathew.imageset/Image 4.png -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Shezad.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "IMG_9097.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/Shezad.imageset/IMG_9097.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamshezad/ChatUI/b26d865dde354f116d77a4b4ab169d13b6b1e767/ChatUI/Assets.xcassets/Shezad.imageset/IMG_9097.png -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/color_bg.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "1.000", 9 | "green" : "1.000", 10 | "red" : "1.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.153", 27 | "green" : "0.110", 28 | "red" : "0.098" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/color_bg_inverted.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.153", 9 | "green" : "0.110", 10 | "red" : "0.098" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "1.000", 27 | "green" : "1.000", 28 | "red" : "1.000" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ChatUI/Assets.xcassets/color_primary.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.341", 9 | "green" : "0.722", 10 | "red" : "0.329" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ChatUI/ChatUIApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatUIApp.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 03/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct ChatUIApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ChatUI/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | 28 | UIApplicationSupportsIndirectInputEvents 29 | 30 | UILaunchScreen 31 | 32 | UIColorName 33 | color_bg 34 | 35 | UIRequiredDeviceCapabilities 36 | 37 | armv7 38 | 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationLandscapeLeft 43 | UIInterfaceOrientationLandscapeRight 44 | 45 | UISupportedInterfaceOrientations~ipad 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationPortraitUpsideDown 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ChatUI/Module/Calls/CallItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CallItem.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 6/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct CallItem: View { 11 | 12 | var userImage: String = "" 13 | var userName: String = "" 14 | var status: String = "" 15 | var time: String = "" 16 | 17 | var body: some View { 18 | HStack{ 19 | Image(userImage) 20 | .resizable() 21 | .background( Color("color_bg_inverted").opacity(0.05)) 22 | .frame(width: 60, height: 60) 23 | .clipShape(Circle()) 24 | VStack(alignment: .leading, spacing: 6){ 25 | HStack{ 26 | Text(userImage) 27 | .fontWeight(.semibold) 28 | .padding(.top, 3) 29 | Spacer() 30 | Text(time) 31 | .foregroundColor(Color("color_primary")) 32 | .padding(.top, 3) 33 | } 34 | 35 | HStack{ 36 | Image(systemName: status == "Outgoing" ? "arrow.up.right" : "arrow.down.left") 37 | .foregroundColor(Color("color_primary")) 38 | Text(status) 39 | .foregroundColor(Color("color_bg_inverted").opacity(0.5)) 40 | .lineLimit(/*@START_MENU_TOKEN@*/2/*@END_MENU_TOKEN@*/) 41 | } 42 | 43 | Divider() 44 | .padding(.top, 8) 45 | } 46 | .padding(.horizontal, 10) 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /ChatUI/Module/Calls/CallListView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CallListView.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 05/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct CallListView: View { 11 | 12 | @State var searchText: String = "" 13 | 14 | let messages = [ 15 | ["user":"Shezad", "message": "Outgoing", "time": "1:30 PM"], 16 | ["user":"Catherine", "message":"Incoming", "time": "4:25 PM"], 17 | ["user":"Shezad", "message":"Incoming", "time": "5:00 PM"], 18 | ["user":"Afna", "message": "Outgoing", "time": "8:45 PM"], 19 | ["user":"Mathew", "message": "Outgoing", "time": "9:00 PM"], 20 | ["user":"Afna", "message": "Incoming", "time": "Yesterday"], 21 | ["user":"Jerin", "message": "Outgoing", "time": "Yesterday"], 22 | ["user":"Shezad", "message":"Outgoing", "time": "Tuesday"], 23 | ["user":"Afna", "message": "Incoming", "time": "Tuesday"], 24 | ["user":"Mathew", "message": "Outgoing", "time": "Tuesday"],] 25 | 26 | var body: some View { 27 | ZStack{ 28 | Color("color_bg").edgesIgnoringSafeArea(.all) 29 | VStack{ 30 | HStack{ 31 | Text("Calls") 32 | .fontWeight(.semibold) 33 | .font(.largeTitle) 34 | Spacer() 35 | Image(systemName: "phone.badge.plus") 36 | .foregroundColor(Color("color_primary")) 37 | .font(.title2) 38 | } 39 | ScrollView(showsIndicators: false){ 40 | VStack(alignment: .leading, spacing: 5){ 41 | 42 | SearchView(searchText: $searchText) 43 | 44 | VStack(spacing: 25){ 45 | ForEach(messages, id: \.self) { message in 46 | 47 | CallItem( 48 | userImage: String(describing: message["user"]!), 49 | userName: String(describing: message["user"]!), 50 | status: String(describing: message["message"]!), 51 | time: String(describing: message["time"]!) 52 | ) 53 | 54 | } 55 | } 56 | 57 | } 58 | } 59 | } 60 | .padding(.top) 61 | .padding(.horizontal) 62 | } 63 | } 64 | } 65 | 66 | struct CallListView_Previews: PreviewProvider { 67 | static var previews: some View { 68 | CallListView() 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /ChatUI/Module/Chats/ChatItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatItem.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 6/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ChatItem: View { 11 | 12 | var userImage: String = "" 13 | var userName: String = "" 14 | var message: String = "" 15 | var time: String = "" 16 | 17 | var body: some View { 18 | HStack{ 19 | Image(userImage) 20 | .resizable() 21 | .background( Color("color_bg_inverted").opacity(0.05)) 22 | .frame(width: 80, height: 80) 23 | .clipShape(Circle()) 24 | VStack(alignment: .leading, spacing: 8){ 25 | HStack{ 26 | Text(userName) 27 | .fontWeight(.semibold) 28 | .padding(.top, 3) 29 | Spacer() 30 | Text(time) 31 | .foregroundColor(Color("color_primary")) 32 | .padding(.top, 3) 33 | } 34 | 35 | 36 | Text(message) 37 | .foregroundColor(Color("color_bg_inverted").opacity(0.5)) 38 | .lineLimit(/*@START_MENU_TOKEN@*/2/*@END_MENU_TOKEN@*/) 39 | Divider() 40 | .padding(.top, 8) 41 | } 42 | .padding(.horizontal, 10) 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ChatUI/Module/Chats/ChatListView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ChatListView.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 05/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ChatListView: View { 11 | 12 | @State var searchText: String = "" 13 | 14 | let users = ["Shezad", "Mathew", "Afna", "Jerin", "Catherine"] 15 | let messages = [ 16 | ["user":"Catherine", "message":"Hi there, How's your work ? did you completed that cross platform app ? ", "time": "10:30 AM"], 17 | ["user":"Shezad", "message": "Are you available tomorrow at 3:30 pm ? i'd like to discuss about our new project", "time": "12:45 AM"], 18 | ["user":"Afna", "message": "Hey, is there any update for morning stand up meeting tomorrow ?", "time": "12:15 PM"], 19 | ["user":"Mathew", "message": "Wow, awesome! Thank you so much for your effort", "time": "4:30 AM"], 20 | ["user":"Jerin", "message": "Yeah, Let's meet tomrrow evening 5:30pm at coffe shop", "time": "8:17 AM"]] 21 | 22 | 23 | var body: some View { 24 | ZStack{ 25 | Color("color_bg").edgesIgnoringSafeArea(.all) 26 | VStack{ 27 | 28 | HStack{ 29 | Text("Chats") 30 | .fontWeight(.semibold) 31 | .font(.largeTitle) 32 | Spacer() 33 | Image(systemName: "square.and.pencil") 34 | .foregroundColor(Color("color_primary")) 35 | .font(.title2) 36 | } 37 | 38 | ScrollView(showsIndicators: false){ 39 | VStack(alignment: .leading, spacing: 5){ 40 | 41 | SearchView(searchText: $searchText) 42 | 43 | OnlineUsersView(users: users) 44 | 45 | Divider() 46 | .padding(.bottom, 20) 47 | 48 | VStack(spacing: 25){ 49 | ForEach(messages, id: \.self) { message in 50 | 51 | ChatItem( 52 | userImage: String(describing: message["user"]!), 53 | userName: String(describing: message["user"]!), 54 | message: String(describing: message["message"]!), 55 | time: String(describing: message["time"]!) 56 | ) 57 | 58 | } 59 | } 60 | 61 | } 62 | } 63 | } 64 | .padding(.top) 65 | .padding(.horizontal) 66 | } 67 | } 68 | } 69 | 70 | struct ChatListView_Previews: PreviewProvider { 71 | static var previews: some View { 72 | ChatListView().preferredColorScheme(.dark) 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /ChatUI/Module/Chats/OnlineUserView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OnlineUserView.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 6/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct OnlineUsersView: View { 11 | 12 | var users = [String]() 13 | 14 | var body: some View { 15 | ScrollView(.horizontal, showsIndicators: false){ 16 | VStack{ 17 | HStack(spacing:25){ 18 | ForEach(users, id: \.self) { user in 19 | VStack{ 20 | Image("\(user)") 21 | .resizable() 22 | .background( Color("color_bg").opacity(0.1)) 23 | .frame(width: 80, height: 80) 24 | .overlay(Circle().stroke(Color("color_primary"), lineWidth: 5)) 25 | .clipShape(Circle()) 26 | Text("\(user)") 27 | .fontWeight(.semibold) 28 | .padding(.top, 3) 29 | } 30 | } 31 | } 32 | } 33 | .padding(.vertical, 20) 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ChatUI/Module/Contacts/ContactItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContactItem.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 6/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContactItem: View { 11 | 12 | var userImage: String = "" 13 | var userName: String = "" 14 | var userEmail: String = "" 15 | 16 | var body: some View { 17 | HStack{ 18 | Image(userImage) 19 | .resizable() 20 | .background( Color("color_bg_inverted").opacity(0.05)) 21 | .frame(width: 60, height: 60) 22 | .clipShape(Circle()) 23 | VStack(alignment: .leading, spacing: 6){ 24 | HStack{ 25 | Text(userName) 26 | .fontWeight(.semibold) 27 | .padding(.top, 3) 28 | Spacer() 29 | Image(systemName: "phone") 30 | .foregroundColor(Color("color_primary")) 31 | .padding(.horizontal) 32 | Image(systemName: "bubble.right") 33 | .foregroundColor(Color("color_primary")) 34 | } 35 | 36 | HStack{ 37 | Text(userEmail) 38 | .foregroundColor(Color("color_bg_inverted").opacity(0.5)) 39 | .lineLimit(/*@START_MENU_TOKEN@*/2/*@END_MENU_TOKEN@*/) 40 | } 41 | 42 | Divider() 43 | .padding(.top, 8) 44 | } 45 | .padding(.horizontal, 10) 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ChatUI/Module/Contacts/ContactsView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContactsView.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 05/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContactsView: View { 11 | 12 | @State var searchText: String = "" 13 | 14 | let messages = [ 15 | ["user":"Shezad", "message": "shezad@example.com"], 16 | ["user":"Catherine", "message":"catherine@example.com"], 17 | ["user":"Afna", "message": "afna@example.com"], 18 | ["user":"Mathew", "message": "mathew@example.com"], 19 | ["user":"Jerin", "message": "jerin@example.com"]] 20 | 21 | var body: some View { 22 | ZStack{ 23 | Color("color_bg").edgesIgnoringSafeArea(.all) 24 | VStack{ 25 | HStack{ 26 | Text("Contacts") 27 | .fontWeight(.semibold) 28 | .font(.largeTitle) 29 | Spacer() 30 | Image(systemName: "person.badge.plus") 31 | .foregroundColor(Color("color_primary")) 32 | .font(.title2) 33 | } 34 | ScrollView(showsIndicators: false){ 35 | VStack(alignment: .leading, spacing: 5){ 36 | 37 | SearchView(searchText: $searchText) 38 | 39 | VStack(spacing: 25){ 40 | ForEach(messages, id: \.self) { message in 41 | 42 | ContactItem( 43 | userImage: String(describing: message["user"]!), 44 | userName: String(describing: message["user"]!), 45 | userEmail: String(describing: message["message"]!) 46 | )} 47 | } 48 | 49 | } 50 | } 51 | } 52 | .padding(.top) 53 | .padding(.horizontal) 54 | } 55 | } 56 | } 57 | 58 | struct ContactsView_Previews: PreviewProvider { 59 | static var previews: some View { 60 | ContactsView() 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /ChatUI/Module/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 03/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | var body: some View { 13 | 14 | //Bottom tab 15 | TabView { 16 | 17 | //Chat 18 | ChatListView() 19 | .tabItem { 20 | Image(systemName: "bubble.left.and.bubble.right") 21 | } 22 | 23 | //Calls 24 | CallListView() 25 | .tabItem { 26 | Image(systemName: "phone") 27 | } 28 | 29 | //Contacts 30 | ContactsView() 31 | .tabItem { 32 | Image(systemName: "person.2") 33 | } 34 | 35 | //Settings 36 | SettingsView() 37 | .tabItem { 38 | Image(systemName: "gear") 39 | } 40 | 41 | } 42 | .accentColor(Color("color_primary")) 43 | } 44 | 45 | //Tabbar customization 46 | init() { 47 | UITabBar.appearance().barTintColor = UIColor(named: "color_bg") 48 | UITabBar.appearance().isTranslucent = false 49 | } 50 | 51 | } 52 | 53 | struct ContentView_Previews: PreviewProvider { 54 | static var previews: some View { 55 | ContentView().preferredColorScheme(.dark) 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /ChatUI/Module/SearchView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchView.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 07/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SearchView: View { 11 | 12 | @Binding var searchText: String 13 | 14 | var body: some View { 15 | VStack{ 16 | 17 | HStack { 18 | Image(systemName: "magnifyingglass") 19 | 20 | TextField("Search", text: $searchText) 21 | .foregroundColor(.primary) 22 | 23 | Button(action: { 24 | self.searchText = "" 25 | }) { 26 | Image(systemName: "xmark.circle.fill").opacity(searchText == "" ? 0 : 1) 27 | } 28 | } 29 | .padding(15) 30 | .foregroundColor(.secondary) 31 | .background(Color("color_bg_inverted").opacity(0.05)) 32 | .clipShape(Capsule()) 33 | 34 | } 35 | .padding(.vertical) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ChatUI/Module/Settings/SettingsHeaderItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsHeaderItem.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 10/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SettingsHeaderItem: View { 11 | var body: some View { 12 | HStack{ 13 | Image("Shezad") 14 | .resizable() 15 | .background( Color("color_bg_inverted").opacity(0.05)) 16 | .frame(width: 80, height: 80) 17 | .clipShape(Circle()) 18 | VStack(alignment: .leading, spacing: 6){ 19 | HStack{ 20 | Text("Shezad Ahamed") 21 | .fontWeight(.semibold) 22 | .padding(.top, 3) 23 | Spacer() 24 | } 25 | 26 | HStack{ 27 | Text("shezadahamed@example.com") 28 | .foregroundColor(Color("color_bg_inverted").opacity(0.5)) 29 | .lineLimit(/*@START_MENU_TOKEN@*/2/*@END_MENU_TOKEN@*/) 30 | } 31 | 32 | Divider() 33 | .padding(.top, 8) 34 | } 35 | .padding(.horizontal, 10) 36 | } 37 | .padding(.vertical, 20) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ChatUI/Module/Settings/SettingsItem.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsItem.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 6/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SettingsItem: View { 11 | 12 | var icon: String = "" 13 | var title: String = "" 14 | var selectedValue: String? 15 | 16 | var body: some View { 17 | HStack{ 18 | Image(systemName: icon) 19 | .font(.system(size: 24)) 20 | .foregroundColor(Color("color_primary")) 21 | 22 | VStack(alignment: .leading, spacing: 6){ 23 | HStack{ 24 | Text(title) 25 | .fontWeight(.semibold) 26 | .padding(.top, 3) 27 | Spacer() 28 | 29 | selectedValue != nil ? 30 | Text(selectedValue ?? "") 31 | .foregroundColor(Color("color_bg_inverted").opacity(0.5)) 32 | .padding(.top, 3): nil 33 | 34 | Image(systemName: "chevron.right") 35 | .foregroundColor(Color("color_primary")) 36 | } 37 | 38 | Divider() 39 | .padding(.top, 8) 40 | } 41 | .padding(.horizontal, 10) 42 | } 43 | .padding(.vertical, 10) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ChatUI/Module/Settings/SettingsView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingsView.swift 3 | // ChatUI 4 | // 5 | // Created by Shezad Ahamed on 05/08/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SettingsView: View { 11 | var body: some View { 12 | ZStack{ 13 | Color("color_bg").edgesIgnoringSafeArea(.all) 14 | VStack{ 15 | HStack{ 16 | Text("Settings") 17 | .fontWeight(.semibold) 18 | .font(.largeTitle) 19 | Spacer() 20 | } 21 | 22 | ScrollView{ 23 | 24 | SettingsHeaderItem() 25 | 26 | SettingsItem(icon: "person", title: "Account") 27 | SettingsItem(icon: "bell", title: "Notifications and Sounds") 28 | SettingsItem(icon: "lock", title: "Privacy & Security") 29 | SettingsItem(icon: "archivebox", title: "Data and Storage") 30 | SettingsItem(icon: "paintbrush", title: "Appearence") 31 | SettingsItem(icon: "globe", title: "Language", selectedValue: "English") 32 | } 33 | .padding(.vertical) 34 | 35 | } 36 | .padding() 37 | } 38 | } 39 | } 40 | 41 | struct SettingsView_Previews: PreviewProvider { 42 | static var previews: some View { 43 | SettingsView() 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ChatUI/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Shezad Ahamed 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ChatUI - Sample app 2 | A simple chat app UI in SwiftUI 3 | 4 |

5 | 6 | 7 | 8 | Gmail: iamshezad.dev@gmail.com 9 | 10 | 11 | instagram: @iamshezad.dev 12 | 13 |

14 | 15 |

16 | 17 |

18 |

ChatUI on both ☀️light and 🌑 dark mode.

19 | 20 | 21 | ## About 22 | ChatUI is a simple project created to implement some of the things i learned in SwiftUI. Currently i'm learning SwiftUI so i thought of converting my learnings into small projects. 23 | 24 | ChatUI is just a UI design of a chat app with some hardcoded data. So this small project might help others to learn a little about designing in SwiftUI. 25 | 26 | This sample project contains chats, calls, contacts and settings screens. will list out below what all i have used in this project: 27 | 28 | 29 | #### Basic View 30 | Text, TextField, Image, Button 31 | 32 | #### Layout 33 | HStack, VStack, ZStack 34 | 35 | #### List 36 | ScrollView, ForEach 37 | 38 | #### Architectural Views 39 | NavigationView, TabView 40 | 41 | #### State and Data Flow 42 | Binding, State 43 | 44 | Some of the other things you can learn from this project is: 45 | - How to setup lauch screen background color in `info.plist` 46 | - How to set background color of a screen using `ZStack` 47 | - How to implement different layouts using `HStack` & `VStack` 48 | - How to set different colors for light and dark mode 49 | 50 | 51 | ## Author 52 | 53 | Shezad Ahamed 54 | 55 | Follow and contact me on: 56 | 57 | 58 | 59 | If you like my content, please consider buying me a coffee. Thank you for your support! 60 | 61 | Buy Me A Coffee 62 | 63 | 64 | -------------------------------------------------------------------------------- /Resources/Main-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iamshezad/ChatUI/b26d865dde354f116d77a4b4ab169d13b6b1e767/Resources/Main-screenshot.png --------------------------------------------------------------------------------