diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index cbaed9890..f5b9e3f66 100644 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -296,6 +296,8 @@ B1B5599220EFC5E400210D55 /* Analytics.m in Sources */ = {isa = PBXBuildFile; fileRef = B1B5598C20EFC5E400210D55 /* Analytics.m */; }; B1B5599320EFC5E400210D55 /* DecryptionFailure.m in Sources */ = {isa = PBXBuildFile; fileRef = B1B5598D20EFC5E400210D55 /* DecryptionFailure.m */; }; B1B5599420EFC5E400210D55 /* DecryptionFailureTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = B1B5599120EFC5E400210D55 /* DecryptionFailureTracker.m */; }; + B1B9194C2118984300FE25B5 /* RoomPredecessorBubbleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = B1B9194A2118984300FE25B5 /* RoomPredecessorBubbleCell.xib */; }; + B1D250D82118AA0A000F4E93 /* RoomPredecessorBubbleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = B1D250D72118AA0A000F4E93 /* RoomPredecessorBubbleCell.m */; }; DDDE2AB95F865F2292B1D315 /* Pods_RiotPods_RiotShareExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23D7292481328A48B8D5D4ED /* Pods_RiotPods_RiotShareExtension.framework */; }; F05927C91FDED836009F2A68 /* MXGroup+Riot.m in Sources */ = {isa = PBXBuildFile; fileRef = F05927C71FDED835009F2A68 /* MXGroup+Riot.m */; }; F083BD1E1E7009ED00A9B29C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BB0D1E7009EC00A9B29C /* AppDelegate.m */; }; @@ -862,6 +864,9 @@ B1B5598F20EFC5E400210D55 /* DecryptionFailure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DecryptionFailure.h; sourceTree = ""; }; B1B5599020EFC5E400210D55 /* Analytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Analytics.h; sourceTree = ""; }; B1B5599120EFC5E400210D55 /* DecryptionFailureTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DecryptionFailureTracker.m; sourceTree = ""; }; + B1B9194A2118984300FE25B5 /* RoomPredecessorBubbleCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RoomPredecessorBubbleCell.xib; sourceTree = ""; }; + B1D250D62118AA0A000F4E93 /* RoomPredecessorBubbleCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomPredecessorBubbleCell.h; sourceTree = ""; }; + B1D250D72118AA0A000F4E93 /* RoomPredecessorBubbleCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomPredecessorBubbleCell.m; sourceTree = ""; }; C195C53961EA28E6900AEB68 /* Pods-Riot.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Riot.release.xcconfig"; path = "Pods/Target Support Files/Pods-Riot/Pods-Riot.release.xcconfig"; sourceTree = ""; }; C5258DFF261AA3AB228A3F11 /* Pods-RiotPods-RiotShareExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotPods-RiotShareExtension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RiotPods-RiotShareExtension/Pods-RiotPods-RiotShareExtension.debug.xcconfig"; sourceTree = ""; }; DB50EEBE8214352B9EBD6394 /* Pods_RiotPods_SiriIntents.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RiotPods_SiriIntents.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -2154,6 +2159,9 @@ B1B558AC20EF768E00210D55 /* RoomSelectedStickerBubbleCell.h */, B1B5588820EF768E00210D55 /* RoomSelectedStickerBubbleCell.m */, B1B558AE20EF768E00210D55 /* RoomSelectedStickerBubbleCell.xib */, + B1D250D62118AA0A000F4E93 /* RoomPredecessorBubbleCell.h */, + B1D250D72118AA0A000F4E93 /* RoomPredecessorBubbleCell.m */, + B1B9194A2118984300FE25B5 /* RoomPredecessorBubbleCell.xib */, ); path = BubbleCells; sourceTree = ""; @@ -2705,6 +2713,7 @@ B1B558F220EF768F00210D55 /* RoomIncomingTextMsgWithoutSenderNameBubbleCell.xib in Resources */, B1B558EA20EF768F00210D55 /* RoomOutgoingTextMsgWithPaginationTitleBubbleCell.xib in Resources */, B1B558CD20EF768F00210D55 /* RoomOutgoingEncryptedAttachmentWithPaginationTitleBubbleCell.xib in Resources */, + B1B9194C2118984300FE25B5 /* RoomPredecessorBubbleCell.xib in Resources */, B1B5572120EE6C4D00210D55 /* ContactsTableViewController.xib in Resources */, B1B5593A20EF7BAC00210D55 /* TableViewCellWithLabelAndLargeTextView.xib in Resources */, B1B558D820EF768F00210D55 /* RoomIncomingEncryptedAttachmentWithPaginationTitleBubbleCell.xib in Resources */, @@ -3052,6 +3061,7 @@ B1B5573220EE6C4D00210D55 /* GroupHomeViewController.m in Sources */, B1B5595220EF9A8700210D55 /* RecentTableViewCell.m in Sources */, B1B5574120EE6C4D00210D55 /* RecentsViewController.m in Sources */, + B1D250D82118AA0A000F4E93 /* RoomPredecessorBubbleCell.m in Sources */, B1B5577120EE702800210D55 /* StickerPickerViewController.m in Sources */, B1B5572020EE6C4D00210D55 /* ContactsTableViewController.m in Sources */, B1B5581920EF625800210D55 /* RoomTitleView.m in Sources */, diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.h b/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.h new file mode 100644 index 000000000..7e026f5a1 --- /dev/null +++ b/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.h @@ -0,0 +1,23 @@ +/* + Copyright 2018 New Vector Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + +@import UIKit; +@import MatrixKit; + +@interface RoomPredecessorBubbleCell : MXKRoomBubbleTableViewCell + +@end diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.m b/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.m new file mode 100644 index 000000000..154709567 --- /dev/null +++ b/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.m @@ -0,0 +1,64 @@ +/* + Copyright 2018 New Vector Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + +#import "RoomPredecessorBubbleCell.h" + +#import "RiotDesignValues.h" + +#pragma mark - Defines & Constants + +static CGFloat const kCustomBackgroundCornerRadius = 5.0; + +#pragma mark - Private Interface + +@interface RoomPredecessorBubbleCell() + +@property (weak, nonatomic) IBOutlet UIView *customBackgroundView; + +@end + +#pragma mark - Implementation + +@implementation RoomPredecessorBubbleCell + +#pragma mark - View life cycle + +- (void)awakeFromNib +{ + [super awakeFromNib]; + + self.customBackgroundView.layer.masksToBounds = YES; +} + +- (void)layoutSubviews +{ + [super layoutSubviews]; + + self.customBackgroundView.layer.cornerRadius = kCustomBackgroundCornerRadius; +} + +#pragma mark - Superclass Overrides + +- (void)customizeTableViewCellRendering +{ + [super customizeTableViewCellRendering]; + + self.messageTextView.tintColor = kRiotPrimaryTextColor; + self.customBackgroundView.backgroundColor = kRiotSecondaryBgColor; +} + +@end diff --git a/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.xib b/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.xib new file mode 100644 index 000000000..5d56f2d79 --- /dev/null +++ b/Riot/Modules/Room/Views/BubbleCells/RoomPredecessorBubbleCell.xib @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +