Skip to content

Commit

Permalink
added KVConstraintExtensionsMaster.podspec, .gitignore & Framework Su…
Browse files Browse the repository at this point in the history
…pport
  • Loading branch information
keshavvishwkarma committed Jan 23, 2016
1 parent d5fca8d commit 5b42467
Show file tree
Hide file tree
Showing 27 changed files with 673 additions and 40 deletions.
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# OS X
.DS_Store
*.DS_Store
**/.DS_Store

# Xcode
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# Bundler
.bundle

#CocoaPods
Pods

#Carthage
Carthage/Build
Binary file modified KVConstraintExtensionsExample/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@
049D9EA11B7BC414007FFBB3 /* NSLayoutConstraint+KVConstraintExtensions.h */,
049D9EA21B7BC414007FFBB3 /* NSLayoutConstraint+KVConstraintExtensions.m */,
);
path = KVConstraintExtensionsMaster;
name = KVConstraintExtensionsMaster;
path = ../KVConstraintExtensionsMaster;
sourceTree = SOURCE_ROOT;
};
04A1534E1B6FFBDC0004D1A9 = {
Expand Down Expand Up @@ -288,7 +289,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = KV_;
LastUpgradeCheck = 0500;
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = Keshav;
TargetAttributes = {
04A153771B6FFBDC0004D1A9 = {
Expand Down Expand Up @@ -410,7 +411,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -425,6 +425,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
Expand All @@ -439,7 +440,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
Expand All @@ -449,7 +450,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -472,7 +472,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
Expand All @@ -487,6 +487,7 @@
GCC_PREFIX_HEADER = "KVConstraintExtensionsExample/KVConstraintExtensionsExample-Prefix.pch";
INFOPLIST_FILE = "KVConstraintExtensionsExample/KVConstraintExtensionsExample-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_BUNDLE_IDENTIFIER = "Keshav.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
Expand All @@ -502,6 +503,7 @@
GCC_PREFIX_HEADER = "KVConstraintExtensionsExample/KVConstraintExtensionsExample-Prefix.pch";
INFOPLIST_FILE = "KVConstraintExtensionsExample/KVConstraintExtensionsExample-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
PRODUCT_BUNDLE_IDENTIFIER = "Keshav.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
Expand All @@ -511,7 +513,6 @@
04A1538D1B6FFBDD0004D1A9 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/KVConstraintExtensionsExample.app/KVConstraintExtensionsExample";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
Expand All @@ -525,6 +526,7 @@
"$(inherited)",
);
INFOPLIST_FILE = "KVConstraintExtensionsExampleTests/KVConstraintExtensionsExampleTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "Keshav.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
Expand All @@ -534,7 +536,6 @@
04A1538E1B6FFBDD0004D1A9 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/KVConstraintExtensionsExample.app/KVConstraintExtensionsExample";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
Expand All @@ -544,6 +545,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "KVConstraintExtensionsExample/KVConstraintExtensionsExample-Prefix.pch";
INFOPLIST_FILE = "KVConstraintExtensionsExampleTests/KVConstraintExtensionsExampleTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "Keshav.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@
<string>KVConstraintExtensionsExample</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>92F55AED-F803-4742-889E-7D98788AFAA8</key>
<key>AF0766E9C80E85306E90F47CE2F98A09DCF73E5F</key>
<string>https://github.com/keshavvishwkarma/KVConstraintExtensionsMaster.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>KVConstraintExtensionsExample/KVConstraintExtensionsExample.xcodeproj/project.xcworkspace</string>
<string>KVConstraintExtensionsExample/KVConstraintExtensionsExample.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>92F55AED-F803-4742-889E-7D98788AFAA8</key>
<key>AF0766E9C80E85306E90F47CE2F98A09DCF73E5F</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/keshavvishwkarma/KVConstraintExtensionsMaster.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>110</integer>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>92F55AED-F803-4742-889E-7D98788AFAA8</string>
<string>AF0766E9C80E85306E90F47CE2F98A09DCF73E5F</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>92F55AED-F803-4742-889E-7D98788AFAA8</string>
<string>AF0766E9C80E85306E90F47CE2F98A09DCF73E5F</string>
<key>IDESourceControlWCCName</key>
<string>KVConstraintExtensionsMaster</string>
</dict>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4510" systemVersion="12F2518" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="Iu4-7b-uxh">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="Iu4-7b-uxh">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<scenes>
<!--View Controller - KVConstraintsExtentions-->
<!--KVConstraintsExtentions-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController storyboardIdentifier="KV_ViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="vXZ-lx-hvc" customClass="KV_ViewController" sceneMemberID="viewController">
Expand All @@ -18,17 +19,15 @@
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eIR-2K-Pwf">
<rect key="frame" x="43" y="460" width="234" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Update Constraint With Animation">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="updateConstraintToggleAction:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="6lG-mI-y2J"/>
</connections>
</button>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Press Examples Button" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dzW-ud-84H">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Press Examples Button" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dzW-ud-84H">
<rect key="frame" x="46" y="205" width="229" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="AmericanTypewriter-CondensedBold" family="American Typewriter" pointSize="25"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
Expand Down Expand Up @@ -110,7 +109,6 @@
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Comming soon..." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JyB-Zd-fiE">
<rect key="frame" x="69" y="203" width="182" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="AmericanTypewriter-CondensedBold" family="American Typewriter" pointSize="28"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
Expand All @@ -130,7 +128,7 @@
</objects>
<point key="canvasLocation" x="155" y="837"/>
</scene>
<!--Table View Controller - KVConstraintsExtentions-->
<!--KVConstraintsExtentions-->
<scene sceneID="JPb-Nx-W5g">
<objects>
<tableViewController id="Nmq-gZ-3Ya" sceneMemberID="viewController">
Expand Down Expand Up @@ -369,7 +367,6 @@
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Comming soon..." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8v2-Ts-3PO">
<rect key="frame" x="69" y="203" width="182" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="AmericanTypewriter-CondensedBold" family="American Typewriter" pointSize="28"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
Expand Down Expand Up @@ -494,7 +491,6 @@
</view>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Drag down and up side" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xGs-9y-o1z">
<rect key="frame" x="36" y="235" width="249" height="35"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="AmericanTypewriter-CondensedBold" family="American Typewriter" pointSize="28"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
Expand Down Expand Up @@ -532,13 +528,8 @@
<point key="canvasLocation" x="612" y="-401"/>
</scene>
</scenes>
<color key="tintColor" red="0.6549337636" green="0.049470909799999997" blue="0.10726483940000001" alpha="1" colorSpace="calibratedRGB"/>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
<segue reference="0Zo-bh-NlZ"/>
</inferredMetricsTieBreakers>
</document>
<color key="tintColor" red="0.6549337636" green="0.049470909799999997" blue="0.10726483940000001" alpha="1" colorSpace="calibratedRGB"/>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,30 @@
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>Keshav.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -24,6 +24,8 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>Main</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ - (void)applyConstaint
{
[[self containerView] applyTopPinConstraintToSuperviewWithPadding:50.0f];
[[self containerView] applyLeadingAndTrailingPinConstraintToSuperviewWithPadding:20];
[[self containerView] applyHeightConstrain:50];
[[self containerView] applyHeightConstraint:50];

[[self textField] applyConstraintFitToSuperviewContentInset:UIEdgeInsetsMake(8, 5, 4, 5)];
[[self headingLabel] applyConstraintFromSiblingViewAttribute:NSLayoutAttributeCenterY toAttribute:NSLayoutAttributeCenterY ofView:[self textField] spacing:defualtConstant];

[[self headingLabel] applyLeftPinConstraintToSuperviewWithPadding:5];
[[self headingLabel] applyHeightConstrain:16.0f];
[[self headingLabel] applyHeightConstraint:16.0f];
}

- (void)createAndConfigureViewHierarchy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ - (void)applyConstaint2
[self.containerView addSubview:contentButton];

// 2. Define the contentButton Size
[contentButton applyHeightConstrain:height];
[contentButton applyHeightConstraint:height];
[contentButton applyWidthConstraint:width];

// 3. Define the contentButton Position
Expand All @@ -106,7 +106,7 @@ - (void)applyConstaint3
[self.secondView applyCenterYPinConstraintToSuperviewWithPadding:50];

// now applied constraints are sufficient but still view will not display/visible because view is not determine any height from the applied constraints so by default view set its height zero. So better is to give some height
[self.secondView applyHeightConstrain:80];
[self.secondView applyHeightConstraint:80];

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ - (void)configureScrollViewHierarchyAndApplyConstraint

UIEdgeInsets contentInset = UIEdgeInsetsMake(20, space, HUGE_VALF, space);
[scrollView applyConstraintFitToSuperviewContentInset:contentInset];
[scrollView applyHeightConstrain:100];
[scrollView applyHeightConstraint:100];

// this method is only used to increase the Constant Value of the height constraint on Ipad with its Ratio
[scrollView updateAppliedConstraintConstantValueForIpadByAttribute:NSLayoutAttributeHeight];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>Keshav.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Expand Down
17 changes: 17 additions & 0 deletions KVConstraintExtensionsMaster.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Pod::Spec.new do |s|
s.name = "KVConstraintExtensionsMaster"
s.version = "1.0.0"

s.summary = "KVConstraintExtensionsMaster is a simple auto-layout lirary, to apply, access or modify already added constraint on any view."
s.description = "# KVConstraintExtensionsMaster is a simple auto-layout lirary, by which you can directly access or modify already applied constraint (means expected constraint) either applied Programatically or applied from Interface Builder on any view. So No need to use more IBOutlet reference."

s.homepage = "https://github.com/keshavvishwkarma/KVConstraintExtensionsMaster"
s.license = 'MIT'
s.author = { "keshav vishwkarma" => "[email protected]" }
s.platform = :ios, '7.0'
s.source = { :git => "https://github.com/keshavvishwkarma/KVConstraintExtensionsMaster.git", :tag => s.version }

s.source_files = 'KVConstraintExtensionsMaster/*.{h,m}'
s.requires_arc = true

end
Loading

0 comments on commit 5b42467

Please sign in to comment.