这些只是2张图片。一个与阴影一个没有...
你必须创建这些图像与CapInsets,使他们可以调整大小
例如
UIImage *buttonImage = [[UIImage imageNamed:@"yourImage"]
resizableImageWithCapInsets:UIEdgeInsetsMake(1, 11, 0, 20)];
要知道UIEdgeInsets的工作原理如下: How does UIEdgeInsetsMake work?
或者在Apple Doc中:
UIEdgeInsetsMake
Creates an edge inset for a button or view.
UIEdgeInsets UIEdgeInsetsMake (
CGFloat top,
CGFloat left,
CGFloat bottom,
CGFloat right
);
Parameters
top
The inset at the top of an object.
left
The inset on the left of an object
bottom
The inset on the bottom of an object.
right
The inset on the right of an object.
Return Value
An inset for a button or view
Discussion
An inset is a margin around the drawing rectangle where each side (left, right, top, and bottom) can have a different value.
Availability
Available in iOS 2.0 and later.
See Also
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKitFunctionReference/Reference/reference.html
您的意思是部分超越'Everywhere'细分市场的闪耀效应? –
不,我想画的是上面的图片。底部图像正是上面使用皮革背景时的样子。像底部光泽,顶部内部阴影和从上到下部分渐变,我只是不能看到如何以及在这个图像中使用什么效果。 –
没有任何“效果”,这些图像很可能是由设计师在Photoshop中制作的。 –