iPhone app: avoiding white screen after splash screen. Let splash screen linger, hide it after UIWebview loads? Splash s
By : Michael Tschida
Date : March 29 2020, 07:55 AM
should help you out Here's a way to achieve it, get rid of all the code in your AppDelegate first of all. In your root view controller add an instance variable of class UIImageView called "splash". Now in the rootViewController.m: code :
-(void) viewWillAppear:(BOOL) animated {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
self.view.userInteractionEnabled = NO;
splash = [[UIImageView alloc] initWithFrame:[UIScreen mainScreen].bounds];
splash.image = [UIImage imageNamed:@"Default.png"];
[self.view addSubview:splash];
});
}
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[splash removeFromSuperView];
});
-(void) viewDidLoad{
CGRect webFrame = CGRectMake(0.0, 0.0, 320.0, 460.0);
UIWebView *webView = [[UIWebView alloc] initWithFrame:webFrame];
webView.delegate = self;
[webView setBackgroundColor:[UIColor clearColor]];
NSString *urlAddress = @"http://www.cnn.com";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
}
-(void) webViewDidFinishLoad:(UIWebView *)webView {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[splash removeFromSuperView];
});
}
|
How to remove the white border around the image in splash screen in full screen
By : Helix
Date : March 29 2020, 07:55 AM
help you fix your problem I apply a transparent background in the theme/style I use for my splash pages, this way I don't have to distort the image being displayed to fit the screen size of the device. This works particularly well when using PNG files that contain a transparent background. Here's the style I use for this "Transparent" theme: code :
<style name="Theme.Transparent" parent="android:Theme">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
<activity
android:name="com.masseria.homework9.SplashActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@style/Theme.Transparent" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
|
white screen between splash screen and startup screen index.html sencha touch after app build package
By : Haris Klana Sanif
Date : March 29 2020, 07:55 AM
help you fix your problem I added cordova splashscreen plugin to avoid the white between corodova screen and sencha load and now I am using sencha touch2.3 which comes along with cordova so I dont see any white screens now.
|
How can I remove white screen which appear before splash screen?
By : P. Regis
Date : March 29 2020, 07:55 AM
it fixes the issue Finally got my answer Splash Screen in Right Way. I do just following. In values->styles.xml I created splash screen background image code :
<style name="AppTheme.Splash" parent="AppTheme.NoActionBar">
<item name="android:windowBackground">@drawable/splash</item>
</style>
<style name="AppTheme.Splash" parent="AppTheme.NoActionBar">
<item name="android:windowBackground">@drawable/splash</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
|
How to Remove White Screen after Splash Screen in React Native For Android
By : lithixz
Date : March 29 2020, 07:55 AM
help you fix your problem I have a default react native project I installed from this turorial and I added a splash screen to my Project with this tutorial. However, now I get: , First: Run npm i react-native-splash-screen --save code :
react-native link react-native-splash-screen or rnpm link react-native-splash-screen
include ':react-native-splash-screen'
project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android')
...
dependencies {
...
compile project(':react-native-splash-screen')
}
// react-native-splash-screen >= 0.3.1
import org.devio.rn.splashscreen.SplashScreenReactPackage;
// react-native-splash-screen < 0.3.1
import com.cboy.rn.splashscreen.SplashScreenReactPackage;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new SplashScreenReactPackage() //here
);
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
}
import React, {Component} from 'react';
import {
StyleSheet,
View,
Text,
TouchableOpacity,
Linking,
} from 'react-native'
import SplashScreen from 'react-native-splash-screen'
export default class example extends Component {
componentDidMount() {
SplashScreen.hide();
}
render() {
return (
<TouchableOpacity
style={styles.container}
onPress={(e)=> {
Linking.openURL('http://www.devio.org/');
}}
>
<View >
<Text style={styles.item}>
SplashScreen 启动屏
</Text>
<Text style={styles.item}>
@:http://www.devio.org/
</Text>
<Text style={styles.item}>
GitHub:https://github.com/crazycodeboy
</Text>
<Text style={styles.item}>
Email:crazycodeboy@gmail.com
</Text>
</View>
</TouchableOpacity>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#f3f2f2',
marginTop: 30
},
item: {
fontSize: 20,
},
line: {
flex: 1,
height: 0.3,
backgroundColor: 'darkgray',
},
})
|