This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize { | |
_node1.style.preferredSize = CGSizeMake(constrainedSize.max.width, 200); | |
_node2.style.preferredSize = CGSizeMake(constrainedSize.max.width, 40); | |
_node3.style.height = _currentState == StateTypeSmall ? ASDimensionMakeWithPoints(300) : ASDimensionMakeWithPoints(450); | |
ASDisplayNode *spacer = [][ASDisplayNode alloc] init]; | |
spacer.style.flexGrow = 1.0; | |
return [ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionVertical |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (ASLayoutSpec *) layoutSpecThatFits:(ASSizeRange)constrainedSize { | |
CGFloat ratio = 9.0/16.0; | |
self.iconImageNode.style.preferredSize = CGSizeMake(16, 16); | |
self.userAvatarImageNode.style.preferredSize = CGSizeMake(48, 48); | |
self.userNameNode.style.flexShrink = 1; | |
ASStackLayoutSpec *displayUnitPayloadStack = | |
[ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionVertical | |
spacing:4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#on windows | |
#careful, it will wake up the dead too | |
require 'open-uri' | |
require 'win32/sound' | |
include Win32 | |
loop do | |
available = true | |
begin |