Skip to content

Commit

Permalink
Merge pull request #90 from corin8823/fix_xib_layout
Browse files Browse the repository at this point in the history
Fix frame for custom view that instantiate from nib
  • Loading branch information
corin8823 committed Sep 16, 2017
2 parents 468c0c0 + 4090a31 commit 2db20e6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions Classes/Popover.swift
Expand Up @@ -124,6 +124,11 @@ open class Popover: UIView {
fatalError("init(coder:) has not been implemented")
}

override open func layoutSubviews() {
super.layoutSubviews()
self.contentView.frame = self.bounds
}

fileprivate func create() {
var frame = self.contentView.frame
frame.origin.x = self.arrowShowPoint.x - frame.size.width * 0.5
Expand Down
8 changes: 4 additions & 4 deletions Example/Podfile.lock
@@ -1,16 +1,16 @@
PODS:
- Popover (1.0.4)
- Popover (1.0.6)

DEPENDENCIES:
- Popover (from `../`)

EXTERNAL SOURCES:
Popover:
:path: "../"
:path: ../

SPEC CHECKSUMS:
Popover: b6999e0625b690f455d0bb031b97ff5f39f33a29
Popover: f811ed4eb4c4843d7bfff357816ed0d97c4ba69e

PODFILE CHECKSUM: 6d2f20b0ca605fb4d048b05500bed6d649d9a399

COCOAPODS: 1.2.0
COCOAPODS: 1.3.1
8 changes: 7 additions & 1 deletion Example/Popover.xcodeproj/project.pbxproj
Expand Up @@ -266,9 +266,12 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-PopoverExample/Pods-PopoverExample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Popover/Popover.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Popover.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -281,13 +284,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-PopoverExample-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down

0 comments on commit 2db20e6

Please sign in to comment.