git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

iOS/GBMenuButton.m

      1 #import "GBMenuButton.h"
      2 
      3 @implementation GBMenuButton
      4 
      5 - (void)setFrame:(CGRect)frame
      6 {
      7     [super setFrame:frame];
      8     if (!self.imageView.image) return;
      9     CGSize imageSize = self.imageView.frame.size;
     10     CGSize titleSize = self.titleLabel.frame.size;
     11     
     12     self.imageEdgeInsets = UIEdgeInsetsMake(0,
     13                                             0,
     14                                             28,
     15                                             -titleSize.width);
     16     
     17     self.titleEdgeInsets = UIEdgeInsetsMake(36,
     18                                             -imageSize.width,
     19                                             0,
     20                                             0);
     21 }
     22 
     23 @end

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.