gpt4 book ai didi

ios - 如何创建一个无需应用商店更新即可远程更新的 View

转载 作者:行者123 更新时间:2023-11-29 12:47:56 25 4
gpt4 key购买 nike

<分区>

我需要创建一个 View 或 ImageView,它们可以从计算机远程更新而无需主要的 App Store 更新。所以基本上,它需要能够通过互联网浏览器或命令行工具进行更改。因此,例如今天我可以拥有一张照片,而在某些日子里我可以远程更改它。是否有我需要实现的代码或是否有可以帮助我的服务?非常感谢大家!

这是目前的代码:

#import "ViewController.h"

@interface ViewController ()
@property (strong, nonatomic) IBOutlet UIImageView *imageView;

@end

@implementation ViewController



- (void) viewDidLoad
{
[super viewDidLoad];
//do stuff here
if(&UIApplicationWillEnterForegroundNotification) { //needed to run on older devices, otherwise you'll get EXC_BAD_ACCESS
NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
[notificationCenter addObserver:self selector:@selector(enteredForeground:) name:UIApplicationWillEnterForegroundNotification object:nil];
}


}
- (void)enteredForeground:(NSNotification*) not
{
UIImageView *imageView; // Assumed to already be setup in a view controller
PFQuery *query = [PFQuery queryWithClassName:@"Image"];
[query getObjectInBackgroundWithId:@"nMW24stvhT" block:^(PFObject *imageObject, NSError *error) {

if (!error) {
PFFile *imageFile = imageObject[@"image"];
[imageFile getDataInBackgroundWithBlock:^(NSData *data, NSError *error) {
if (!error && data) {
UIImage *image = [UIImage imageWithData:data];
if (image) {
imageView.image = image;
}
}
}];
}
}];}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

@end

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com