Recently, the project encountered a very strange problem.
When you click the button to start presentViewController, the following results are displayed:
Code:
- AddFriendViewController * addFriendVC = [[AddFriendViewController alloc] init];
- UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController: addFriendVC];
- [Self presentViewController: nav animated: YES completion: nil];
- [AddFriendVC release];
- [Nav release];
It was later discovered that the background color of UINavigationController was black;
To solve the problem of black lines in TableView click Search:
Code:
- AddFriendViewController * addFriendVC = [[AddFriendViewController alloc] init];
- UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController: addFriendVC];
- [Nav. view setBackgroundColor: UIColorFromRGB (0xC6C6CB)];
- [Self presentViewController: nav animated: YES completion: nil];
- [AddFriendVC release];
- [Nav release];
Changed the background color of Nav:
[Nav. view setBackgroundColor: UIColorFromRGB (0xC6C6CB)];
Effect: