added method to create flexible and fixed with UIBarButtonItem