diff --git a/ANAChat.podspec b/ANAChat.podspec index 1a2f96d..2e87251 100644 --- a/ANAChat.podspec +++ b/ANAChat.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.name = 'ANAChat' - s.version = '0.3.5' + s.version = '0.3.6' s.summary = 'ANAChat iOS' # This description is used to generate tags and improve search results. diff --git a/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/Contents.json b/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/Contents.json index 23cc0f1..7d824c8 100644 --- a/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/Contents.json +++ b/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/Contents.json @@ -12,7 +12,7 @@ }, { "idiom" : "universal", - "filename" : "tick@3x.png", + "filename" : "tick.png", "scale" : "3x" } ], diff --git a/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick.png b/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick.png new file mode 100644 index 0000000..11e115c Binary files /dev/null and b/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick.png differ diff --git a/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@1x.png b/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@1x.png index 4386bed..5f1edd7 100644 Binary files a/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@1x.png and b/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@1x.png differ diff --git a/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@2x.png b/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@2x.png index c660746..53fdf09 100644 Binary files a/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@2x.png and b/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@2x.png differ diff --git a/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@3x.png b/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@3x.png deleted file mode 100644 index ab1fc8a..0000000 Binary files a/ANAChat/Classes/SDKAssets.xcassets/sentImage.imageset/tick@3x.png and /dev/null differ diff --git a/ANAChat/Classes/UIComponents/Cells/ChatCarouselCollectionCell.swift b/ANAChat/Classes/UIComponents/Cells/ChatCarouselCollectionCell.swift index 81dfff5..ef825c6 100644 --- a/ANAChat/Classes/UIComponents/Cells/ChatCarouselCollectionCell.swift +++ b/ANAChat/Classes/UIComponents/Cells/ChatCarouselCollectionCell.swift @@ -35,6 +35,7 @@ class ChatCarouselCollectionCell: UICollectionViewCell { // Initialization code titleLabel.font = UIConfigurationUtility.Fonts.carouselTitleFont descriptionLabel.font = UIConfigurationUtility.Fonts.carouselDescriptionFont + titleLabel.textColor = UIConfigurationUtility.Colors.TextColor self.buttonsTableView.delegate = self self.buttonsTableView.dataSource = self // self.buttonsTableView.delegate = self @@ -64,6 +65,8 @@ class ChatCarouselCollectionCell: UICollectionViewCell { }else{ self.imageViewHeightConstraint.constant = 130 } + self.imageView.image = CommonUtility.getImageFromBundle(name: "placeholder") + if item.mediaType == 0{ self.playButton.isHidden = true if let url = item.mediaUrl{ diff --git a/ANAChat/Classes/UIComponents/Cells/ChatReceiveTextCell.swift b/ANAChat/Classes/UIComponents/Cells/ChatReceiveTextCell.swift index 1f99ddb..5767681 100644 --- a/ANAChat/Classes/UIComponents/Cells/ChatReceiveTextCell.swift +++ b/ANAChat/Classes/UIComponents/Cells/ChatReceiveTextCell.swift @@ -30,6 +30,7 @@ class ChatReceiveTextCell: UITableViewCell { cellBackgroundView?.layer.cornerRadius = 10.0 self.arrowView.backgroundColor = UIColor.clear textLbl?.font = PreferencesManager.sharedInstance.getContentFont() + textLbl.textColor = UIConfigurationUtility.Colors.TextColor timeLbl?.font = UIConfigurationUtility.Fonts.TimeLblFont timeLbl?.alpha = 0.5 diff --git a/ANAChat/Classes/UIComponents/Cells/ChatReceiverMediaCell.swift b/ANAChat/Classes/UIComponents/Cells/ChatReceiverMediaCell.swift index cdb3453..437b266 100644 --- a/ANAChat/Classes/UIComponents/Cells/ChatReceiverMediaCell.swift +++ b/ANAChat/Classes/UIComponents/Cells/ChatReceiverMediaCell.swift @@ -97,6 +97,7 @@ class ChatReceiverMediaCell: UITableViewCell { let myActivityIndicator = UIActivityIndicatorView(activityIndicatorStyle: UIActivityIndicatorViewStyle.gray) myActivityIndicator.center = (self.cellImage.center) myActivityIndicator.startAnimating() + self.cellImage.image = CommonUtility.getImageFromBundle(name: "placeholder") // self.cellImage.addSubview(myActivityIndicator) if let simpleMessage = messageObject as? Simple{ switch simpleMessage.mediaType { diff --git a/ANAChat/Classes/UIComponents/Cells/ChatSenderTextCell.swift b/ANAChat/Classes/UIComponents/Cells/ChatSenderTextCell.swift index 8a8b5a6..e38c8e1 100644 --- a/ANAChat/Classes/UIComponents/Cells/ChatSenderTextCell.swift +++ b/ANAChat/Classes/UIComponents/Cells/ChatSenderTextCell.swift @@ -25,6 +25,7 @@ class ChatSenderTextCell: UITableViewCell { paddingImageView.backgroundColor = PreferencesManager.sharedInstance.getSenderThemeColor() cellBackgroundView?.layer.cornerRadius = 10.0 textLbl?.font = PreferencesManager.sharedInstance.getContentFont() + textLbl.textColor = UIConfigurationUtility.Colors.TextColor timeLbl?.font = UIConfigurationUtility.Fonts.TimeLblFont timeLbl?.alpha = 0.5 @@ -69,11 +70,13 @@ class ChatSenderTextCell: UITableViewCell { } if messageObject.syncedWithServer == true{ - self.statusImageView.image = CommonUtility.getImageFromBundle(name: "sentImage") + self.statusImageView.image = CommonUtility.getImageFromBundle(name: "sentImage").withRenderingMode(.alwaysTemplate) }else{ - self.statusImageView.image = CommonUtility.getImageFromBundle(name: "sendingImage") + self.statusImageView.image = CommonUtility.getImageFromBundle(name: "sendingImage").withRenderingMode(.alwaysTemplate) } + self.statusImageView.tintColor = PreferencesManager.sharedInstance.getBaseThemeColor() + self.setNeedsLayout() if let simpleMessage = messageObject as? Simple{ if let text = simpleMessage.text{ diff --git a/ANAChat/Classes/UIComponents/ViewControllers/ChatViewController.swift b/ANAChat/Classes/UIComponents/ViewControllers/ChatViewController.swift index b9074cd..6983494 100644 --- a/ANAChat/Classes/UIComponents/ViewControllers/ChatViewController.swift +++ b/ANAChat/Classes/UIComponents/ViewControllers/ChatViewController.swift @@ -31,6 +31,8 @@ import MobileCoreServices public var headerLogoImageName : String = "chatty" public var baseThemeColor : UIColor = PreferencesManager.sharedInstance.getBaseThemeColor() public var senderThemeColor : UIColor = PreferencesManager.sharedInstance.getSenderThemeColor() + public var botTitleColor : UIColor = UIColor.white + public var baseAPIUrl : String! var contentFont : UIFont? @@ -325,6 +327,8 @@ import MobileCoreServices if let contentFont = self.contentFont{ PreferencesManager.sharedInstance.configureContentText(withFont: contentFont) } + self.headerTitleLabel.textColor = self.botTitleColor + self.headerDescriptionLabel.textColor = self.botTitleColor PreferencesManager.sharedInstance.configureSenderTheme(withColor: senderThemeColor) PreferencesManager.sharedInstance.configureBaseTheme(withColor: baseThemeColor) PreferencesManager.sharedInstance.configureBusinessId(withText: businessId) diff --git a/ANAChat/Classes/Utilities/UIConfigurationUtility.swift b/ANAChat/Classes/Utilities/UIConfigurationUtility.swift index 328a746..2015421 100644 --- a/ANAChat/Classes/Utilities/UIConfigurationUtility.swift +++ b/ANAChat/Classes/Utilities/UIConfigurationUtility.swift @@ -24,6 +24,7 @@ struct UIConfigurationUtility{ static let BackgroundColor = UIColor.init(hexString: "#F1F2F4") static let SenderThemeColor = UIColor.init(hexString: "#3C3C3C") static let MediaDescriptionColor = UIColor.init(hexString: "#FFFFFF") + static let TextColor = UIColor.init(hexString: "#3c3c3c") } } diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index fd66828..a559ea9 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -42,7 +42,6 @@ 3027C5881FA85BE8002DE921 /* Chat_iOSSDK.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Chat_iOSSDK.xcdatamodel; sourceTree = ""; }; 3059CC091FA76C5E007C4C47 /* FCMMessagesManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FCMMessagesManager.swift; sourceTree = ""; }; 3059CC0A1FA76CD5007C4C47 /* ChatViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatViewController.swift; sourceTree = ""; }; - 30A969131FD94457009C0121 /* SDKAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = SDKAssets.xcassets; sourceTree = ""; }; 30A969141FD9446D009C0121 /* ChatSenderMediaCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ChatSenderMediaCell.xib; sourceTree = ""; }; 30A969151FD9446D009C0121 /* ChatSenderTextCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatSenderTextCell.swift; sourceTree = ""; }; 30A969161FD9446D009C0121 /* ChatSenderTextCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ChatSenderTextCell.xib; sourceTree = ""; }; @@ -148,6 +147,7 @@ 30C499DD1FCD6393005B2095 /* AddressView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AddressView.xib; sourceTree = ""; }; 30CFC5091FB5D24200DD95A9 /* ChatCarouselCollectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatCarouselCollectionCell.swift; sourceTree = ""; }; 30CFC50A1FB5D24200DD95A9 /* ChatCarouselCollectionCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ChatCarouselCollectionCell.xib; sourceTree = ""; }; + 30ED78B51FFCC088007CEA67 /* SDKAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = SDKAssets.xcassets; sourceTree = ""; }; 30F60ED81FACB0120010C26F /* InputTextFieldView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InputTextFieldView.xib; sourceTree = ""; }; 3AA8E5965D48453B1D3AD48D2FC928BD /* ANAChat-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ANAChat-umbrella.h"; sourceTree = ""; }; 3B0AFD2491288033548D6D938C0DCED9 /* Pods-ANAChat_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ANAChat_Tests-acknowledgements.markdown"; sourceTree = ""; }; @@ -251,7 +251,7 @@ 30BE4AB91FA7593100F64363 /* Classes */ = { isa = PBXGroup; children = ( - 30A969131FD94457009C0121 /* SDKAssets.xcassets */, + 30ED78B51FFCC088007CEA67 /* SDKAssets.xcassets */, 30BE4ABC1FA7594500F64363 /* APIHelpers */, 30BE4B081FA7594500F64363 /* DBHelpers */, 30BE4B061FA7594500F64363 /* MockJson */,