Although you are asking specifically about a Storyboard scene and a ViewController, the problem is more generically stated as:
'Should I have one class, which has logic to act in 2 different ways, given some state determining variable, or two different classes?'
The motivation for having one class, is because much of the logic is shared, and you don't want to duplicate code (and bugs). This is a good motivation.
The argument for having two classes is that you get rid of the if/else code, which can reduce bugs by reducing complexity and making the classes more well defined for their exact purpose. This is also a good motivation.
Fortunately you can have the best of both worlds. Have three classes.
The first class, A, will implement all of the logic common to both situations. In your case this will have all the logic except for the "Edit" Button for the "My Profile" view, and perhaps something like the "Add Friend" button for the "Other Profile" View.
The second class, B, and third class, C, will implement the logic for the "Edit button" and "Add friend button" respectively, AND also utilize the first class for common logic. You can have the relationship with the first class be either inheritance from class A, or delegation to an instance of class A. Using derivation is generally best in a case like this, where you can ensure all base class functionality is equally relevant to both subclasses, and you don't mind exposing the derivation in your public interface.