We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#import "CYLPlusButtonSubclass.h"
//上下结构的 button
(void)layoutSubviews { CGFloat const imageViewEdgeWidth = self.bounds.size.width * 0.9;
CGFloat const imageViewEdgeHeight = imageViewEdgeWidth * 0.9; CGFloat const centerOfView = self.bounds.size.width * 0.5; CGFloat const labelLineHeight = self.titleLabel.font.lineHeight; CGFloat const verticalMargin = (self.bounds.size.height - labelLineHeight - imageViewEdgeHeight) * 0.6; // imageView 和 titleLabel 中心的 Y 值 CGFloat const centerOfImageView = verticalMargin + imageViewEdgeHeight * 0.5; CGFloat const centerOfTitleLabel = imageViewEdgeHeight + verticalMargin * 2 + labelLineHeight * 0.5 + 5;
// CGFloat const centerOfTitleLabel = centerOfImageView + centerOfImageView * 0.5 + 5;;
//imageView position 位置 self.imageView.bounds = CGRectMake(0, 10, imageViewEdgeWidth *112/118, imageViewEdgeWidth); self.imageView.center = CGPointMake(centerOfView, centerOfImageView-10); //title position 位置 self.titleLabel.bounds = CGRectMake(0, 0, self.bounds.size.width, labelLineHeight); self.titleLabel.center = CGPointMake(centerOfView, centerOfTitleLabel); } 这个需要按照屏幕大小判断吗?
The text was updated successfully, but these errors were encountered:
ChenYilong
No branches or pull requests
#import "CYLPlusButtonSubclass.h"
//上下结构的 button
(void)layoutSubviews {
CGFloat const imageViewEdgeWidth = self.bounds.size.width * 0.9;
// CGFloat const centerOfTitleLabel = centerOfImageView + centerOfImageView * 0.5 + 5;;
The text was updated successfully, but these errors were encountered: