A quick way to get an inner border is to use the layer's shadow properties from the view you want bordered (note the -1, which places the border inside the edge):
myView.layer.shadowOpacity = 1.0;
myView.layer.shadowColor = [UIColor blackColor].CGColor;
myView.layer.shadowOffset = CGSizeMake( 0, -1 );
Otherwise you can subclass the view and put something like this in your drawRect: method:
[super drawRect: rect];
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState( context );
CGContextSetStrokeColorWithColor( context, [UIColor blackColor].CGColor );
CGContextSetLineWidth( context, 1.0 );
CGContextMoveToPoint( context, 0, 0 );
CGContextAddLineToPoint( context, self.bounds.size.width, 0 );
CGContextStrokePath( context );
CGContextRestoreGState( context );