diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index ea4a1929e..c97d38b4b 100644 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -12,6 +12,8 @@ 3205ED851E97725E003D65FA /* DirectoryServerTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3205ED831E97725E003D65FA /* DirectoryServerTableViewCell.xib */; }; 325072141E8C0AC900A084B6 /* LaunchScreenLogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 325072131E8C0AC900A084B6 /* LaunchScreenLogo.png */; }; 325E1C151E8D03950018D91E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 325E1C131E8D03950018D91E /* LaunchScreen.storyboard */; }; + 32FD0A3D1EB0CD9B0072B066 /* BugReportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32FD0A3B1EB0CD9B0072B066 /* BugReportViewController.m */; }; + 32FD0A3E1EB0CD9B0072B066 /* BugReportViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 32FD0A3C1EB0CD9B0072B066 /* BugReportViewController.xib */; }; E2EAC1A4FBD6FE5228584591 /* libPods-Riot.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D8737F782E108CFD6908691 /* libPods-Riot.a */; }; F02C1A861E8EB04C0045A404 /* PeopleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F02C1A841E8EB04C0045A404 /* PeopleViewController.m */; }; F05BD79E1E7AEBF800C69941 /* UnifiedSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F05BD79D1E7AEBF800C69941 /* UnifiedSearchViewController.m */; }; @@ -456,6 +458,9 @@ 3205ED831E97725E003D65FA /* DirectoryServerTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DirectoryServerTableViewCell.xib; sourceTree = ""; }; 325072131E8C0AC900A084B6 /* LaunchScreenLogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = LaunchScreenLogo.png; path = Assets/Images/LaunchScreenLogo.png; sourceTree = ""; }; 325E1C141E8D03950018D91E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 32FD0A3A1EB0CD9B0072B066 /* BugReportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BugReportViewController.h; sourceTree = ""; }; + 32FD0A3B1EB0CD9B0072B066 /* BugReportViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BugReportViewController.m; sourceTree = ""; }; + 32FD0A3C1EB0CD9B0072B066 /* BugReportViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BugReportViewController.xib; sourceTree = ""; }; 7D8737F782E108CFD6908691 /* libPods-Riot.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Riot.a"; sourceTree = BUILT_PRODUCTS_DIR; }; F02C1A831E8EB04C0045A404 /* PeopleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PeopleViewController.h; sourceTree = ""; }; F02C1A841E8EB04C0045A404 /* PeopleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PeopleViewController.m; sourceTree = ""; }; @@ -1459,6 +1464,9 @@ F083BC1C1E7009EC00A9B29C /* AuthenticationViewController.h */, F083BC1D1E7009EC00A9B29C /* AuthenticationViewController.m */, F083BC1E1E7009EC00A9B29C /* AuthenticationViewController.xib */, + 32FD0A3A1EB0CD9B0072B066 /* BugReportViewController.h */, + 32FD0A3B1EB0CD9B0072B066 /* BugReportViewController.m */, + 32FD0A3C1EB0CD9B0072B066 /* BugReportViewController.xib */, F083BC1F1E7009EC00A9B29C /* CallViewController.h */, F083BC201E7009EC00A9B29C /* CallViewController.m */, F083BC211E7009EC00A9B29C /* CallViewController.xib */, @@ -2159,6 +2167,7 @@ F083BE291E7009ED00A9B29C /* StartChatViewController.xib in Resources */, F083BE6F1E7009ED00A9B29C /* RoomOutgoingAttachmentWithPaginationTitleBubbleCell.xib in Resources */, F083BEA31E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.xib in Resources */, + 32FD0A3E1EB0CD9B0072B066 /* BugReportViewController.xib in Resources */, F0E05A3E1EA0F9EB004B83FB /* tab_people_selected@3x.png in Resources */, F083BE5D1E7009ED00A9B29C /* RoomIncomingAttachmentWithoutSenderInfoBubbleCell.xib in Resources */, F083BD2B1E7009ED00A9B29C /* animatedLogo-3.png in Resources */, @@ -2383,6 +2392,7 @@ F083BE3E1E7009ED00A9B29C /* RoomIncomingEncryptedAttachmentWithPaginationTitleBubbleCell.m in Sources */, F083BE071E7009ED00A9B29C /* AttachmentsViewController.m in Sources */, F083BE051E7009ED00A9B29C /* RiotDesignValues.m in Sources */, + 32FD0A3D1EB0CD9B0072B066 /* BugReportViewController.m in Sources */, F083BE311E7009ED00A9B29C /* DeviceTableViewCell.m in Sources */, F083BE501E7009ED00A9B29C /* RoomOutgoingEncryptedTextMsgBubbleCell.m in Sources */, F083BDED1E7009ED00A9B29C /* MXKRoomBubbleTableViewCell+Riot.m in Sources */, diff --git a/Riot/ViewController/BugReportViewController.h b/Riot/ViewController/BugReportViewController.h new file mode 100644 index 000000000..c7b377660 --- /dev/null +++ b/Riot/ViewController/BugReportViewController.h @@ -0,0 +1,35 @@ +/* + 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 BugReportViewController : UIViewController + +@property (weak, nonatomic) IBOutlet UIView *containerView; +@property (weak, nonatomic) IBOutlet UILabel *titleLabel; +@property (weak, nonatomic) IBOutlet UILabel *descriptionLabel; +@property (weak, nonatomic) IBOutlet UITextView *bugReportDescriptionTextView; +@property (weak, nonatomic) IBOutlet UILabel *logsDescriptionLabel; +@property (weak, nonatomic) IBOutlet UILabel *sendLogsLabel; + +@property (weak, nonatomic) IBOutlet UIButton *cancelButton; +@property (weak, nonatomic) IBOutlet UIButton *sendButton; + ++ (instancetype)bugReportViewController; + +- (void)showInViewController:(UIViewController*)viewController; + +@end diff --git a/Riot/ViewController/BugReportViewController.m b/Riot/ViewController/BugReportViewController.m new file mode 100644 index 000000000..e530093ef --- /dev/null +++ b/Riot/ViewController/BugReportViewController.m @@ -0,0 +1,72 @@ +/* + 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 "BugReportViewController.h" + +@interface BugReportViewController () + +@end + +@implementation BugReportViewController + +#pragma mark - Class methods + ++ (UINib *)nib +{ + return [UINib nibWithNibName:NSStringFromClass([BugReportViewController class]) + bundle:[NSBundle bundleForClass:[BugReportViewController class]]]; +} + ++ (instancetype)bugReportViewController +{ + return [[[self class] alloc] initWithNibName:NSStringFromClass([BugReportViewController class]) + bundle:[NSBundle bundleForClass:[BugReportViewController class]]]; +} + +#pragma mark - + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + _containerView.layer.cornerRadius = 20; + + _bugReportDescriptionTextView.layer.borderWidth = 1.0f; + _bugReportDescriptionTextView.layer.borderColor = [UIColor redColor].CGColor; +} + +- (void)showInViewController:(UIViewController *)viewController +{ + self.providesPresentationContextTransitionStyle = YES; + self.definesPresentationContext = YES; + self.modalPresentationStyle = UIModalPresentationOverCurrentContext; + + [viewController presentViewController:self animated:YES completion:nil]; +} + +#pragma mark - User actions + +- (IBAction)onSendButtonPress:(id)sender +{ + +} + +- (IBAction)onCancelButtonPressed:(id)sender +{ + [self dismissViewControllerAnimated:YES completion:nil]; +} + +@end diff --git a/Riot/ViewController/BugReportViewController.xib b/Riot/ViewController/BugReportViewController.xib new file mode 100644 index 000000000..6f69965bf --- /dev/null +++ b/Riot/ViewController/BugReportViewController.xib @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +