Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Improvements and tweaks #81

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Examples/Sample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
4FB285CA1A766D0300B573DE /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4FB285C91A766D0300B573DE /* Default-568h@2x.png */; };
4FB285D01A7671A400B573DE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB285611A75E94C00B573DE /* AppDelegate.m */; };
4FB285D11A7671A400B573DE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB285C31A766CEC00B573DE /* main.m */; };
4FB285D21A7671A400B573DE /* TableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FB285861A75E9F700B573DE /* TableViewController.m */; };
4FB285D41A7671A400B573DE /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 336F7DD8CF855E383EFF085A /* libPods.a */; };
4FB285D71A7671A400B573DE /* Storyboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4FB285C41A766CEC00B573DE /* Storyboard.storyboard */; };
4FB285D81A7671A400B573DE /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4FB285C91A766D0300B573DE /* Default-568h@2x.png */; };
Expand All @@ -34,8 +33,8 @@
4FEA1D801B7A5DF800E1DBDF /* CollectionView-Example.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4FEA1D7F1B7A5DF800E1DBDF /* CollectionView-Example.storyboard */; };
4FEA1D861B7A67E700E1DBDF /* UICollectionView+SupplementaryElementScrolling.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FEA1D851B7A67E700E1DBDF /* UICollectionView+SupplementaryElementScrolling.m */; };
4FEFACCB1B7989C700D905B8 /* images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4FEFACCA1B7989C700D905B8 /* images.xcassets */; };
4FEFACCC1B798CA800D905B8 /* TableView-Example.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4FB285841A75E9F700B573DE /* TableView-Example.storyboard */; };
C46F97D4245BDD7548E1F345 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 336F7DD8CF855E383EFF085A /* libPods.a */; };
F59D40EC1C6AE665004E9AAC /* TableView-Example.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4FB285841A75E9F700B573DE /* TableView-Example.storyboard */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -332,7 +331,7 @@
4FEFACCB1B7989C700D905B8 /* images.xcassets in Resources */,
4FB285C71A766CEC00B573DE /* Storyboard.storyboard in Resources */,
4FB285CA1A766D0300B573DE /* Default-568h@2x.png in Resources */,
4FEFACCC1B798CA800D905B8 /* TableView-Example.storyboard in Resources */,
F59D40EC1C6AE665004E9AAC /* TableView-Example.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -470,7 +469,6 @@
files = (
4FB285D01A7671A400B573DE /* AppDelegate.m in Sources */,
4FB285D11A7671A400B573DE /* main.m in Sources */,
4FB285D21A7671A400B573DE /* TableViewController.m in Sources */,
4FB285E11A76730300B573DE /* ScrollViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
12 changes: 4 additions & 8 deletions Examples/Sample/ScrollView Example/ScrollView-Example.storyboard
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7531" systemVersion="14F6a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="JyB-XK-KeH">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="JyB-XK-KeH">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7520"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<scenes>
<!--Scroll View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ScrollViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="320" height="504"/>
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" pagingEnabled="YES" showsVerticalScrollIndicator="NO" id="BsW-kk-xnD">
Expand Down Expand Up @@ -60,9 +61,4 @@
<point key="canvasLocation" x="307.19999999999999" y="446.82666666666665"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>
16 changes: 6 additions & 10 deletions Examples/Sample/TableView Example/TableView-Example.storyboard
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7531" systemVersion="14F6a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="SSM-4I-4Nc">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="SSM-4I-4Nc">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7520"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<scenes>
<!--Table View Controller-->
Expand All @@ -11,13 +12,13 @@
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="boT-KB-vDz">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="Cell" id="oax-kK-hjG">
<rect key="frame" x="0.0" y="114" width="320" height="44"/>
<rect key="frame" x="0.0" y="113.5" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="oax-kK-hjG" id="e7W-dt-q4x">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
</tableViewCell>
Expand Down Expand Up @@ -52,10 +53,5 @@
<point key="canvasLocation" x="78.400000000000006" y="178.91999999999999"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<color key="tintColor" red="1" green="0.37254901959999998" blue="0.37647058820000001" alpha="1" colorSpace="calibratedRGB"/>
</document>
3 changes: 3 additions & 0 deletions Examples/Sample/TableView Example/TableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ - (DZNSegmentedControl *)control
_control.delegate = self;
_control.selectedSegmentIndex = 1;
_control.bouncySelectionIndicator = NO;
_control.disableSelectedSegment = NO;
_control.height = 60.0f;

// _control.height = 120.0f;
Expand Down Expand Up @@ -201,6 +202,8 @@ - (void)updateControlCounts

- (void)didChangeSegment:(DZNSegmentedControl *)control
{
NSLog(@"%s",__FUNCTION__);

[self.tableView reloadData];
}

Expand Down
4 changes: 2 additions & 2 deletions Source/DZNSegmentedControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum {
@property (nonatomic, weak) IBOutlet id <DZNSegmentedControlDelegate> delegate;
/** The items displayed on the control. */
@property (nonatomic, retain) NSArray *items;
/** The index number identifying the selected segment (that is, the last segment touched). */
/** The index number identifying the selected segment (that is, the last segment touched). Default is 0. */
@property (nonatomic) NSInteger selectedSegmentIndex;
/** Returns the number of segments the receiver has. */
@property (nonatomic, readonly) NSUInteger numberOfSegments;
Expand All @@ -37,7 +37,7 @@ enum {
/** The height of the selection indicator. Default is 2pts. */
@property (nonatomic, readwrite) CGFloat selectionIndicatorHeight UI_APPEARANCE_SELECTOR;
/** The duration of the indicator's animation. Default is 0.2 sec. */
@property (nonatomic, readwrite) CGFloat animationDuration UI_APPEARANCE_SELECTOR;
@property (nonatomic, readwrite) NSTimeInterval animationDuration UI_APPEARANCE_SELECTOR;
/** The font family to be used on labels. Default is system font (HelveticaNeue). Font size is managed by the class. */
@property (nonatomic, retain) UIFont *font UI_APPEARANCE_SELECTOR;
/** The color of the hairline. Default is light gray. To hide the hairline, just set clipsToBounds to YES, like you would do it for UIToolBar & UINavigationBar. */
Expand Down
Loading