reducing size of the section in tableview

i am very much new to iphone development ,I wanted to reduce the size of a section in the grouped table view i.e reducing the width of the section . how can it be implemented thanks in advance

Answers


- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return kHeightForHeaderInSection;
}   


 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
        // wrapperView - by default has the width of the table, you can change the height
        // with the heightForHeaderInSection method
        UIView *aView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];

        // your real section view: a label, a uiview, whatever
        CGRect myFrame; // create your own frame
        myFrame.origin = CGPointMake(10, 0);
        myFrame.size = CGSizeMake(tableView.bounds.size.width-10,kHeightForHeaderInSection); 
        UILabel *label = [[[UILabel alloc] initWithFrame:myFrame] autorelease];
        label.text = @"myText"
        [aView addSubview:label];

        return aView;
    }

Need Your Help

Strange behaviour of included JS file in node.js

javascript node.js include express socket.io

I am making a node app that is in it current state very simple, but I get an issue I can't figure out.

out.write with android EditText

java android

I have many out.write lines of code (515 in total) that build an excel.xml file. I now need to be able to build a out.write line of code to include values from a string. Here is an out.write code...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.