小编sup*_*key的帖子

iOS标签栏图标模糊

我的标签栏图标显得模糊.

在此输入图像描述

我使用Photoshop创建了图标,并在确定每个图标的大小时遵循iOS人机界面指南.

例如图标大小:30x30px png

这只发生在标签栏上.我想知道是否因为图像的分辨率或编程问题而发生这种情况......

tabbar ios

7
推荐指数
1
解决办法
3208
查看次数

更改 iOS App 中 UIRefreshControl 指示器的初始位置

我正在使用 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)

uitableview ios uirefreshcontrol

6
推荐指数
3
解决办法
5242
查看次数

如何自定义UIRefreshControl以使下拉高度低于默认值

在iOS App中的UIRefreshControl中,我认为默认设置是当我将UITableView(UISrollView)拉下约"100px"时,刷新开始.

我想使上面的值更小.(例如,"50px")

这可能吗?

如果可能,请告诉我示例代码.

objective-c ios uirefreshcontrol

6
推荐指数
1
解决办法
988
查看次数

在Android应用程序中,调用onResume方法时,在状态栏中清除小图标

我正在使用推送通知开发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

1
推荐指数
1
解决办法
2665
查看次数