我必须将单元格alpha设置为最小值.我在单元格中尝试以下代码行,它不起作用.我也设置了不透明但它仍然不起作用.有人对此有所了解吗?
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.alpha =0.5;
Run Code Online (Sandbox Code Playgroud) 我必须找到a的行数UITextView.没有可用的属性,如a numberOfLines,on UITextView.我使用以下公式,但它不起作用.有人对此有所了解吗?
int numLines = txtview.contentSize.height/txtview.font.lineHeight;
Run Code Online (Sandbox Code Playgroud) 如何给UIImageView提供动画.我有以下动画代码.但不适用于imageview
MyImage=[[UIImageView alloc] initWithFrame:CGRectMake(10, 57, 220,140)];
MyImage.image=[UIImage imageNamed:@"image.png"];
MyImage.userInteractionEnabled = YES;
[self.view addSubview:MyImage];
[UIView beginAnimations : nil context : nil];
[UIView setAnimationCurve : UIViewAnimationCurveLinear];
[UIView setAnimationDuration : 1.00];
UIView setAnimationTransition : UIViewAnimationTransitionFlipFromLeft forView : MyImage cache : YES];
[UIView commitAnimations];
Run Code Online (Sandbox Code Playgroud)
有人有想法让我知道..谢谢
我必须将ffe1b1的标题颜色设置为UIButton.RGB值为ffe1b1为255,225,177.我正在尝试这个代码,但它没有正确反映.我在网上搜索颜色组件是介于0.0和1.0之间的浮点数!那么什么是给出RGB值的正确方法.谢谢
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom] ;
btn.frame = CGRectMake(134.0, 193.0, 80.0, 30.0);
[btn setBackgroundImage:img forState:UIControlStateNormal];
[btn setTitle:@"Contact" forState:UIControlStateNormal];
[btn setTitleColor:[UIColor colorWithRed:255.0 green:225.0 blue:177.0 alpha:0.6 ]forState: UIControlStateNormal];
Run Code Online (Sandbox Code Playgroud) 我必须创建一个应用程序,其中iPhone在按钮按下事件时保持沉默.
你怎么能以编程方式做到这一点?