Follow these ateps to lock the messages on iphone:
Step 1
Tap the "Settings" button on the iPhone's Home screen to launch the Settings application.
Step 2
Tap the "General" button, followed by the "Passcode Lock" button.
Step 3
Tap the "Turn Passcode On" button at the top of the screen.
Step 4
Enter a four-digit passcode, then enter it again to confirm it is correct. The passcode lock is now active, requiring you to enter this four-digit code whenever the device is turned on.
Step 5
Press the "Home" button to close the Settings app, followed by the "Sleep/Wake" button on top of the iPhone to turn it off. Your text messages are now protected, and cannot be accessed without the passcode.