You can try it this way:
NSString *bundle = [[NSBundle mainBundle] bundlePath];
NSString *webPath = [bundle stringByAppendingPathComponent:{htmlFilename}]
UIWebView* browser = [[UIWebView alloc] initWithFrame:
CGRectMake(0, 0, 200, 300)];
[browser loadRequest:[NSURLRequest requestWithURL:
[NSURL fileURLWithPath:webPath]]];
[self addSubview:browser];
You'll also want to set delegates on the browser so you get informed when the contents have finished loading.
According config/database.php
and .env
file that You show us everything is ok.
SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected
this means that database is not selected,
seems like have problem with existence of database,
or DB_NAME
does not get in config database
param.
There is some steps You've to check:
1) Check Your config/database.php
file contents to have such content:
<?php
return [
'fetch' => PDO::FETCH_CLASS,
'default' => 'mysql',
'connections' => [
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST'),
'database' => env('DB_DATABASE'),
'username' => env('DB_USERNAME'),
'password' => env('DB_PASSWORD'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false
],
'mysql2' => [
'driver' => 'mysql',
'host' => env('DB_HOST_ACADEMY'),
'database' => env('DB_DATABASE_ACADEMY'),
'username' => env('DB_USERNAME_ACADEMY'),
'password' => env('DB_PASSWORD_ACADEMY'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false
],
'mysql3' => [
'driver' => 'mysql',
'host' => env('DB_HOST_ACADEMY'),
'database' => env('DB_DATABASE_ACADEMY_DATE'),
'username' => env('DB_USERNAME_ACADEMY'),
'password' => env('DB_PASSWORD_ACADEMY'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false
]
],
'migrations' => 'migrations',
'redis' => [
'cluster' => false,
'default' => [
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0
]
]
];
2) Check Your .env
file exist in Your app root and it's not .env.example
3) Check .env
file to have this line, if Yes so delete and copy-paste it from here (maybe spelling issue):
DB_DATABASE=gestion-inscriptions-v2
p.s. because of in Your question files are correct need more debug info, screenshot and etc. to see that problem is not with .env
or file system (maybe .env
file cannot be read).
Best Answer
In Interface Builder, select your UIImageView and open the Attributes Inspector (Command-1). Change the View Mode to "Aspect Fit".
If you want to do this in code, set the contentMode of your UIImageView to UIViewContentModeScaleAspectFit.