diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index 2b2c92438..1d7803650 100644 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -454,6 +454,8 @@ F0B4CBA71F41CA44008E99C5 /* DeviceView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0B4CBA61F41CA44008E99C5 /* DeviceView.xib */; }; F0B4CBAA1F41E71A008E99C5 /* RiotNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = F0B4CBA91F41E71A008E99C5 /* RiotNavigationController.m */; }; F0B4CBAC1F41F090008E99C5 /* EncryptionInfoView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0B4CBAB1F41F090008E99C5 /* EncryptionInfoView.xib */; }; + F0B4CBB11F4215E3008E99C5 /* EventDetailsView.m in Sources */ = {isa = PBXBuildFile; fileRef = F0B4CBAF1F4215E3008E99C5 /* EventDetailsView.m */; }; + F0B4CBB21F4215E3008E99C5 /* EventDetailsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F0B4CBB01F4215E3008E99C5 /* EventDetailsView.xib */; }; F0D869EB1EC455A100BB0A2B /* create_direct_chat.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D869E81EC455A100BB0A2B /* create_direct_chat.png */; }; F0D869EC1EC455A100BB0A2B /* create_direct_chat@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D869E91EC455A100BB0A2B /* create_direct_chat@2x.png */; }; F0D869ED1EC455A100BB0A2B /* create_direct_chat@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D869EA1EC455A100BB0A2B /* create_direct_chat@3x.png */; }; @@ -1081,6 +1083,9 @@ F0B4CBA81F41E71A008E99C5 /* RiotNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RiotNavigationController.h; sourceTree = ""; }; F0B4CBA91F41E71A008E99C5 /* RiotNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RiotNavigationController.m; sourceTree = ""; }; F0B4CBAB1F41F090008E99C5 /* EncryptionInfoView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = EncryptionInfoView.xib; sourceTree = ""; }; + F0B4CBAE1F4215E3008E99C5 /* EventDetailsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventDetailsView.h; sourceTree = ""; }; + F0B4CBAF1F4215E3008E99C5 /* EventDetailsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EventDetailsView.m; sourceTree = ""; }; + F0B4CBB01F4215E3008E99C5 /* EventDetailsView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = EventDetailsView.xib; sourceTree = ""; }; F0D869E81EC455A100BB0A2B /* create_direct_chat.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = create_direct_chat.png; sourceTree = ""; }; F0D869E91EC455A100BB0A2B /* create_direct_chat@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "create_direct_chat@2x.png"; sourceTree = ""; }; F0D869EA1EC455A100BB0A2B /* create_direct_chat@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "create_direct_chat@3x.png"; sourceTree = ""; }; @@ -1713,6 +1718,7 @@ F083BC571E7009EC00A9B29C /* Views */ = { isa = PBXGroup; children = ( + F0B4CBAD1F4215E3008E99C5 /* Event */, F083BC581E7009EC00A9B29C /* Authentication */, F083BC5F1E7009EC00A9B29C /* Contact */, F083BC631E7009EC00A9B29C /* Device */, @@ -2076,6 +2082,16 @@ name = Products; sourceTree = ""; }; + F0B4CBAD1F4215E3008E99C5 /* Event */ = { + isa = PBXGroup; + children = ( + F0B4CBAE1F4215E3008E99C5 /* EventDetailsView.h */, + F0B4CBAF1F4215E3008E99C5 /* EventDetailsView.m */, + F0B4CBB01F4215E3008E99C5 /* EventDetailsView.xib */, + ); + path = Event; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -2282,6 +2298,7 @@ F083BE6D1E7009ED00A9B29C /* RoomOutgoingAttachmentWithoutSenderInfoBubbleCell.xib in Resources */, F083BE9F1E7009ED00A9B29C /* TableViewCellWithCheckBoxes.xib in Resources */, F0E05A421EA0F9EB004B83FB /* tab_rooms_selected.png in Resources */, + F0B4CBB21F4215E3008E99C5 /* EventDetailsView.xib in Resources */, F083BE4F1E7009ED00A9B29C /* RoomOutgoingEncryptedAttachmentWithPaginationTitleBubbleCell.xib in Resources */, F0B4CBAC1F41F090008E99C5 /* EncryptionInfoView.xib in Resources */, F083BD241E7009ED00A9B29C /* add_participant@3x.png in Resources */, @@ -2593,6 +2610,7 @@ F083BEA21E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.m in Sources */, F083BE0A1E7009ED00A9B29C /* CallViewController.m in Sources */, F083BE111E7009ED00A9B29C /* DirectoryViewController.m in Sources */, + F0B4CBB11F4215E3008E99C5 /* EventDetailsView.m in Sources */, F083BE1E1E7009ED00A9B29C /* RoomMessagesSearchViewController.m in Sources */, F083BE231E7009ED00A9B29C /* RoomViewController.m in Sources */, F083BE9E1E7009ED00A9B29C /* TableViewCellWithCheckBoxes.m in Sources */, diff --git a/Riot/ViewController/RoomViewController.m b/Riot/ViewController/RoomViewController.m index 49b93f906..6415dc6bf 100644 --- a/Riot/ViewController/RoomViewController.m +++ b/Riot/ViewController/RoomViewController.m @@ -28,6 +28,8 @@ #import "AttachmentsViewController.h" +#import "EventDetailsView.h" + #import "RoomAvatarTitleView.h" #import "ExpandedRoomTitleView.h" #import "SimpleRoomTitleView.h" @@ -348,6 +350,9 @@ // Custom the attachmnet viewer [self setAttachmentsViewerClass:AttachmentsViewController.class]; + // Custom the event details view + [self setEventDetailsViewClass:EventDetailsView.class]; + // Update navigation bar items self.navigationItem.rightBarButtonItem.target = self; self.navigationItem.rightBarButtonItem.action = @selector(onButtonPressed:); diff --git a/Riot/Views/Event/EventDetailsView.h b/Riot/Views/Event/EventDetailsView.h new file mode 100644 index 000000000..382bd9d02 --- /dev/null +++ b/Riot/Views/Event/EventDetailsView.h @@ -0,0 +1,22 @@ +/* + Copyright 2017 Vector Creations 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 + +@interface EventDetailsView : MXKEventDetailsView + +@end + diff --git a/Riot/Views/Event/EventDetailsView.m b/Riot/Views/Event/EventDetailsView.m new file mode 100644 index 000000000..17f7b2178 --- /dev/null +++ b/Riot/Views/Event/EventDetailsView.m @@ -0,0 +1,34 @@ +/* + Copyright 2017 Vector Creations 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 "EventDetailsView.h" + +#import "RiotDesignValues.h" + +@implementation EventDetailsView + +-(void)customizeViewRendering +{ + [super customizeViewRendering]; + + self.backgroundColor = kRiotSecondaryBgColor; + self.textView.backgroundColor = kRiotPrimaryBgColor; + self.textView.textColor = kRiotPrimaryTextColor; + self.redactButton.tintColor = kRiotColorGreen; + self.closeButton.tintColor = kRiotColorGreen; +} + +@end diff --git a/Riot/Views/Event/EventDetailsView.xib b/Riot/Views/Event/EventDetailsView.xib new file mode 100644 index 000000000..67885fac6 --- /dev/null +++ b/Riot/Views/Event/EventDetailsView.xib @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +