我的标签栏图标显得模糊.
我使用Photoshop创建了图标,并在确定每个图标的大小时遵循iOS人机界面指南.
例如图标大小:30x30px png
这只发生在标签栏上.我想知道是否因为图像的分辨率或编程问题而发生这种情况......
我正在使用 UITableView 和 UIRefreshControl 开发 iOS 应用程序。
我想将 UIRefreshControl 指示器的初始位置从默认值向下更改 50px。我写下以下代码。
然而,初始位置没有改变。它保持在原来的位置。
你能告诉我如何解决这个问题吗?
CGFloat customRefreshControlHeight = 50.0f;
CGFloat customRefreshControlWidth = 320.0f;
CGRect customRefreshControlFrame = CGRectMake(0.0f,
customRefreshControlHeight,
customRefreshControlWidth,
customRefreshControlHeight);
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] initWithFrame:customRefreshControlFrame];
refreshControl.tintColor = [UIColor blackColor];
[refreshControl addTarget:self action:@selector(onRefresh:) forControlEvents:UIControlEventValueChanged];
[self.tableView addSubview:refreshControl];
Run Code Online (Sandbox Code Playgroud) 在iOS App中的UIRefreshControl中,我认为默认设置是当我将UITableView(UISrollView)拉下约"100px"时,刷新开始.
我想使上面的值更小.(例如,"50px")
这可能吗?
如果可能,请告诉我示例代码.
我正在使用推送通知开发Android应用程序.
我想在调用onResume方法时清除推送通知中出现的状态栏中的小图标.
然后,我编写以下代码,但它不能正常工作.
※※PushHandlerActivity.java
@Override
public void onResume() {
super.onResume();
GCMIntentService.cancelNotification(this);
finish();
}
Run Code Online (Sandbox Code Playgroud)
※※GCMIntentService.java
public class GCMIntentService extends GCMBaseIntentService {
public static final int NOTIFICATION_ID = 1234;
private static final String TAG = "GCMIntentService";
public GCMIntentService() {
super("GCMIntentService");
}
public void createNotification(Context context, Bundle extras)
{
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
String appName = getAppName(this);
Intent notificationIntent = new Intent(this, PushHandlerActivity.class);
notificationIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
notificationIntent.putExtra("pushBundle", extras);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(context)
.setDefaults(Notification.DEFAULT_ALL)
.setSmallIcon(context.getApplicationInfo().icon) …Run Code Online (Sandbox Code Playgroud) android push-notification android-notifications google-cloud-messaging