Iphone 如何更改标题部分的大小?
我想更改我的部分标题的大小,但我真的不知道该怎么做 你能帮我吗? 代码如下:Iphone 如何更改标题部分的大小?,iphone,header,titanium,appcelerator,Iphone,Header,Titanium,Appcelerator,我想更改我的部分标题的大小,但我真的不知道该怎么做 你能帮我吗? 代码如下: // create tab group var tabGroup = Titanium.UI.createTabGroup({ }); var win= Titanium.UI.createWindow({ title:'', tabBarHidden: true, barColor:'black', backgroundColor:'white' }); var tab= T
// create tab group
var tabGroup = Titanium.UI.createTabGroup({
});
var win= Titanium.UI.createWindow({
title:'',
tabBarHidden: true,
barColor:'black',
backgroundColor:'white'
});
var tab= Ti.UI.createTab({
title:'//////',
window:win
});
var view = Titanium.UI.createView({
backgroundColor: "#FFFEEE"
});
var section1 = Titanium.UI.createTableViewSection({
headerTitle:"text long enough "
});
var row1 = Ti.UI.createTableViewRow({
height:'auto',
selectionStyle:Ti.UI.iPhone.TableViewCellSelectionStyle.NONE
});
var label1 = Titanium.UI.createLabel({
text:'////// :',
font:{fontSize:16,fontWeight:'bold'},
left: 10
});
var mailtf = Ti.UI.createTextField({
left: 75,
right:10,
borderStyle: Ti.UI.INPUT_BORDERSTYLE_NONE
});
row1.add(label1);
row1.add(mailtf);
section1.add(row1);
....
etc
使用这种方法
(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 44; //change according to your condition
}
我没有使用appcelerator,但它看起来与objective c上的本机函数和委托调用集成在一起。 要设置新标题大小和个性化视图,请尝试以下两种方法:
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section;
以及:
你正在寻找一个自定义标题,所以你需要做一个视图,而不是标题。将
headerTitle
替换为headerView
oula这让我很害怕,我可能会加上确切的位置对不起,但我真的是从Appcelerator开始的谢谢你,请问我必须在哪里插入此代码,因为当我将其放在节声明之后时,会出现此错误这是出现的错误[object TiUITableViewRow]“自动高度”值为0,这意味着此视图可能不可见。我很欣赏你的可爱,我会尝试这样做,我会将结果告知你非常感谢我制作的nikel改变了,但是我的文本颜色和标题部分的默认设置相同,我必须把类似的颜色放进去,因为我喜欢黑色,非常感谢much@Sabrina我注意到你是新来的堆栈溢出和有5个问题希望没有选择的答案?只是想确保您了解最佳答案功能的工作原理。
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;