Add the tableview line separators.

This commit is contained in:
yannick
2015-11-20 15:06:48 +01:00
parent 03ac45c673
commit 726efea874
7 changed files with 113 additions and 21 deletions
@@ -0,0 +1,22 @@
/*
Copyright 2015 OpenMarket 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 "MXKTableViewCell.h"
@interface TableViewCellSeparator : MXKTableViewCell
@end
@@ -0,0 +1,21 @@
/*
Copyright 2015 OpenMarket 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 "TableViewCellSeparator.h"
@implementation TableViewCellSeparator
@end
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="2" id="5Je-1y-foH" customClass="TableViewCellSeparator">
<rect key="frame" x="0.0" y="0.0" width="600" height="2"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5Je-1y-foH" id="hCm-wd-Yup">
<rect key="frame" x="0.0" y="0.0" width="600" height="1"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tableViewCellContentView>
</tableViewCell>
</objects>
</document>
@@ -18,18 +18,9 @@
@interface TableViewCellWithLabelAndLargeTextView : MXKTableViewCell
{
@protected
UIView *inputAccessoryView;
}
@property (strong, nonatomic) IBOutlet UILabel *mxkLabel;
@property (strong, nonatomic) IBOutlet UITextView *mxkTextView;
/**
The custom accessory view associated with the text field. This view is
actually used to retrieve the keyboard view. Indeed the keyboard view is the superview of
the accessory view when the text field become the first responder.
*/
@property (readonly) UIView *inputAccessoryView;
@end
@@ -17,16 +17,12 @@
#import "TableViewCellWithLabelAndLargeTextView.h"
@implementation TableViewCellWithLabelAndLargeTextView
@synthesize inputAccessoryView;
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self)
{
// Add an accessory view to the text view in order to retrieve keyboard view.
//inputAccessoryView = [[UIView alloc] initWithFrame:CGRectZero];
//_mxkTextView.inputAccessoryView = inputAccessoryView;
}
return self;
@@ -34,7 +30,6 @@
- (void)dealloc
{
//inputAccessoryView = nil;
}
@end