Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion EBForeNotification/Classes/EBBannerView.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ -(void)setUserInfo:(NSDictionary *)userInfo{
appIcon = [UIImage imageNamed:@"AppIcon80x80"];
}
[self.icon_image setImage:appIcon];
NSDictionary *infoDictionary = [[NSBundle bundleForClass:[self class]] infoDictionary];
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
// app名称
NSString *appName = [infoDictionary objectForKey:@"CFBundleName"];
if (!appName) {
Expand Down
46 changes: 24 additions & 22 deletions EBForeNotification/Classes/EBBannerView.xib
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
Expand All @@ -15,14 +17,14 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SfK-LV-meM">
<rect key="frame" x="41" y="6" width="30" height="17"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="14"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="现在" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zvg-9L-jbZ">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="现在" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zvg-9L-jbZ">
<rect key="frame" x="252" y="6" width="28" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.53333333333333333" green="0.62745098039215685" blue="0.11764705882352941" alpha="1" colorSpace="calibratedRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.53333333333333333" green="0.62745098039215685" blue="0.11764705882352941" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3LX-GO-ytA">
<rect key="frame" x="13" y="6" width="20" height="20"/>
Expand All @@ -39,7 +41,7 @@
</imageView>
<view opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3XN-Ja-hWT">
<rect key="frame" x="140" y="63" width="40" height="4"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.5" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="1aX-v6-8T6"/>
<constraint firstAttribute="height" constant="4" id="5KV-c9-Tif"/>
Expand All @@ -54,11 +56,11 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Content" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8ye-hb-Ujc">
<rect key="frame" x="41" y="23" width="239" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.078431372549019607" green="0.078431372549019607" blue="0.078431372549019607" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.078431372549019607" green="0.078431372549019607" blue="0.078431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="8ye-hb-Ujc" secondAttribute="bottom" constant="8" id="BXv-cQ-3ZT"/>
<constraint firstAttribute="trailing" secondItem="Zvg-9L-jbZ" secondAttribute="trailing" constant="40" id="G4g-N7-H4b"/>
Expand Down Expand Up @@ -114,8 +116,8 @@
<rect key="frame" x="0.0" y="0.0" width="304" height="36"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cdU-tQ-e7r">
<rect key="frame" x="36" y="9.5" width="28.5" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<rect key="frame" x="36" y="10.5" width="26" height="16"/>
<fontDescription key="fontDescription" type="system" weight="light" pointSize="13"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="M5S-BA-9WJ">
Expand All @@ -131,13 +133,13 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="现在" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0d1-ud-Cqn">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="现在" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0d1-ud-Cqn">
<rect key="frame" x="260" y="9.5" width="28" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" weight="light" pointSize="13"/>
<color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</label>
</subviews>
<color key="backgroundColor" red="0.96078431369999995" green="0.96078431369999995" blue="0.96078431369999995" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.96078431369999995" green="0.96078431369999995" blue="0.96078431369999995" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="cdU-tQ-e7r" firstAttribute="centerY" secondItem="M5S-BA-9WJ" secondAttribute="centerY" id="6Re-zk-fCe"/>
<constraint firstItem="0d1-ud-Cqn" firstAttribute="centerY" secondItem="M5S-BA-9WJ" secondAttribute="centerY" id="FfH-Kn-g9V"/>
Expand All @@ -152,12 +154,12 @@
<rect key="frame" x="0.0" y="36" width="304" height="22"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Content" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PlN-Fu-byf">
<rect key="frame" x="15" y="0.5" width="281" height="20.5"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
<rect key="frame" x="15" y="2" width="281" height="18"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.93333333330000001" green="0.93333333330000001" blue="0.93333333330000001" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.93333333330000001" green="0.93333333330000001" blue="0.93333333330000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="PlN-Fu-byf" firstAttribute="leading" secondItem="ggN-eQ-t44" secondAttribute="leading" constant="15" id="7IU-4e-1iU"/>
<constraint firstAttribute="bottom" secondItem="PlN-Fu-byf" secondAttribute="bottom" constant="8" id="i37-lN-GSM"/>
Expand All @@ -183,7 +185,7 @@
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="7yW-Dq-ZqA" secondAttribute="trailing" constant="8" id="0h1-xp-uVn"/>
<constraint firstItem="7yW-Dq-ZqA" firstAttribute="leading" secondItem="FuQ-h0-Tnu" secondAttribute="leading" constant="8" id="bHy-zK-tmO"/>
Expand Down
4 changes: 2 additions & 2 deletions EBForeNotification/EBForeNotification.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extern NSString *const EBBannerViewDidClick; //监听点击弹窗的事件
+(void)handleRemoteNotification:(NSDictionary*)userInfo customSound:(NSString*)soundName isIos10:(BOOL)isIos10;
@end

static NSString *const EBBannerViewTimeText = @"现在"; //默认弹窗时间 default banner time
static NSString *const EBBannerViewTimeText = @"now"; //默认弹窗时间 default banner time


/*
Expand Down Expand Up @@ -189,4 +189,4 @@ static NSString *const EBBannerViewTimeText = @"现在"; //默认弹窗时间
4095 - - Vibrate There was no category for this sound before 2.2.
In the SDK this is the constant kSystemSoundID_Vibrate.

*/
*/