我使用以下代码在我的博客中添加了一个Twitter分享按钮:
<a class="twitter popup" href="http://twitter.com/share?text=mytext">Tweet Me</a>
Run Code Online (Sandbox Code Playgroud)
然后我用弹出窗口打开它:
<script type="text/javascript">
$('.popup').click(function(event) {
var width = 575,
height = 400,
left = ($(window).width() - width) / 2,
top = ($(window).height() - height) / 2,
url = this.href,
opts = 'status=1' +
',width=' + width +
',height=' + height +
',top=' + top +
',left=' + left;
window.open(url, 'twitte', opts);
return false;
});</script>
Run Code Online (Sandbox Code Playgroud)
有一种方式来设置弹出窗口的样式吗?我希望我的样式弹出窗口中包含twitter形式.
我怎样才能在视图中淡入UIButton?
现在我添加它:
[myView addSubview:myButton];
Run Code Online (Sandbox Code Playgroud)
但如果我想褪色呢?
[UIView animateWithDuration:3.0
delay:0.0
options: UIViewAnimationCurveEaseInOut
animations:^{myButton.alpha = 1.0}
completion:^(BOOL finished){ [myView addSubview:myButton]; }];
Run Code Online (Sandbox Code Playgroud)
谢谢!