小编Cha*_*har的帖子

什么是Java(Android)中的List <?>?

可能重复:
什么是类型<Type>被调用?
List <?>在java泛型中的含义是什么?

package com.xyz.pckgeName;

import java.util.ArrayList;
import java.util.List;

public class Statement {

// public String
public String status;
public String user_id;
public String name;
public String available_balance;
public String current_balance;
public String credit_card_type;
public String bank_id;
public List<Statements> statements = new ArrayList<Statement.Statements>();

public class Statements {
    public String month;
    public String account_id;
    public String user_id;
    public String id;
    public List<Transaction> transactions = new ArrayList<Transaction>();
}
}
Run Code Online (Sandbox Code Playgroud)

任何人都可以解释这两个陈述的含义

public List<Statements> statements = new ArrayList<Statement.Statements>();

public List<Transaction> transactions = new …
Run Code Online (Sandbox Code Playgroud)

java generics android

8
推荐指数
1
解决办法
4万
查看次数

该操作无法完成.(com.facebook.sdk错误5.)FACEBOOK视频上传

我写了以下代码,用于从iOS设备上传视频到Facebook.

-(void)uploadVideo {

    NSLog(@"UPload Videio ");


    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"mov"];

    NSLog(@"Path is %@", filePath);

    NSData *videoData = [NSData dataWithContentsOfFile:filePath];

    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   videoData, @"video.mov",
                                   @"video/quicktime", @"contentType",
                                   @"Video Test Title", @"title",
                                   @"Video Test Description", @"description",
                                   nil];
    //  [facebook requestWithGraphPath:@"me/videos"
    //                         andParams:params
    //                     andHttpMethod:@"POST"
    //                       andDelegate:self];

    if (FBSession.activeSession.isOpen) {


        [FBRequestConnection startWithGraphPath:@"me/videos"
                                     parameters:params
                                     HTTPMethod:@"POST"
                              completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {

                                  if(!error) {
                                      NSLog(@"OK: %@", result);
                                  } else
                                      NSLog(@"Error: %@", error.localizedDescription);

                              }];

    } else {

        // We don't …
Run Code Online (Sandbox Code Playgroud)

facebook ios

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

ld:找不到文件:/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib.a修复问题

在Pod中它显示如下.

libGTM_NSData+zlib_external.a
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

在Build设置中,它如下所示

$(PODS_ROOT)/GoogleUtilities/Libraries/libGTM_NSData+zlib.a
Run Code Online (Sandbox Code Playgroud)

在配置中,它显示为此.

-force_load $(PODS_ROOT)/GoogleUtilities/Libraries/libGTM_NSData+zlib_external.a
Run Code Online (Sandbox Code Playgroud)

我怎么能删除没有找到libGTM_NSData + zlib.a的错误,因为我知道新的谷歌库只有libGTM_NSData + zlib_external.a.

我在用

pod 'Google/Analytics'
pod 'Google/SignIn'
Run Code Online (Sandbox Code Playgroud)

在我的Pod文件中.

请提供适当的结构来消除此类问题.我试图重命名并保持所有相同的名称为_external,但它没有解决问题.

通过终端最终安装Pods显示Log如下

 Analyzing dependencies
    Downloading dependencies
    Installing AFNetworking (2.6.3)
    Installing AMScrollingNavbar (1.5.1)
    Installing Bolts (1.7.0)
    Installing ChartboostSDK (6.4.0)
    Installing Charts (2.2.4)
    Installing Crashlytics (3.7.0)
    Installing Fabric (1.6.7)
    Installing Google (2.0.3)
    Installing Google-Mobile-Ads-SDK (7.7.1)
    Installing GoogleAnalytics (3.14.0)
    Installing GoogleAppUtilities (1.1.0)
    Installing GoogleAuthUtilities (2.0.0)
    Installing GoogleInterchangeUtilities (1.2.0)
    Installing GoogleNetworkingUtilities (1.2.0)
    Installing GoogleSignIn (3.0.0)
    Installing GoogleSymbolUtilities (1.1.0)
    Installing GoogleUtilities (1.2.0)
    Installing MMDrawerController (0.5.7)
    Installing Optimizely-iOS-SDK …
Run Code Online (Sandbox Code Playgroud)

google-analytics ios cocoapods

7
推荐指数
2
解决办法
3474
查看次数

React Native iOS Swift 错误:无法构建 Objective-C 模块“React”

遵循链接中的步骤无助于将 React Native 集成到现有项目中。

链接: https: //reactnative.dev/docs/integration-with-existing-apps

配置

Mac OS X - 10.15.6 (19G2021)
XCode - 12.1 (12A7403)
React Native Cli - 2.0.1
React Native - 0.63.4
Run Code Online (Sandbox Code Playgroud)

包.json

{
  "name": "MyReactNativeApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "yarn react-native start"
  }
  "dependencies": {
    "react-native": "^0.63.4"
  }
}
Run Code Online (Sandbox Code Playgroud)

Podfile

source 'https://github.com/CocoaPods/Specs.git'

# Required for Swift apps
platform :ios, '11.0'
use_frameworks!

# The target name is most likely the name of your project.
target 'MyReactNativeApp' do
  
  # Your 'node_modules' directory is …
Run Code Online (Sandbox Code Playgroud)

ios swift react-native

6
推荐指数
0
解决办法
485
查看次数

为什么我得到错误"[UIViewController tableView:numberOfRowsInSection:]:无法识别的选择器发送到实例0x4e38c50'"?

我制作了一个TabBarApplication,并制作了3个控制器,其中1个是继承UITableViewController,我将部分的数量设为"返回1",部分中的行数为"返回2",

我遇到以下问题,为什么?

[UIViewController tableView:numberOfRowsInSection:]: 无法识别的选择器发送到实例0x4e38c50'"

#import <UIKit/UIKit.h>


@interface List : UITableViewController {

}

@end
Run Code Online (Sandbox Code Playgroud)

和.m文件是

    #import "List.h"


    @implementation List


    #pragma mark -
    #pragma mark View lifecycle

/*
- (void)viewDidLoad {
    [super viewDidLoad];

    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
*/

/*
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}
*/
/*
- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
}
*/
/*
- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
}
*/ …
Run Code Online (Sandbox Code Playgroud)

iphone uitableview xib

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

如何在iPhone中的UITextField中放置第一个小字符?

我想插入一个电子邮件地址,因此第一个字符将是小写字母,但是当键盘出现时,第一个字符是大写字母.我该怎么办?

iphone uikeyboard

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

停止蓝牙GKSession的不相关日志?

如何在GKSession开始搜索时停止以下代码?

 BTM: posting notification BluetoothAvailabilityChangedNotification
2011-05-17 20:25:05.666 BLUConnect[2120:307] BTM: Adding new device 0x110db0 Jahangir Nawaz’s iPhone 00:23:DF:3C:BC:5B 0xf5210003
2011-05-17 20:25:05.669 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0xffffffff eventType = 0 event = 0 result = 0
2011-05-17 20:25:06.406 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 1 result = 0
2011-05-17 20:25:06.466 BLUConnect[2120:307] BTM: _btServiceEventCallback: service = 0x800 eventType = 0 event = 11 result = 305
2011-05-17 20:25:06.491 BLUConnect[2120:307] BTM: received BT_SERVICE_CONNECT event type with …
Run Code Online (Sandbox Code Playgroud)

iphone bluetooth gksession ios

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

什么是使用AutoLayout的最佳实践?

自iOS7以来,我一直在寻找标准的GUI设计模式.

在我之前的两个应用程序中,我取消选中autolayout并使用自动调整大小.

它通常看起来像这样

在此输入图像描述

主视图在SIZE INSPECTOR中如下所示.

在此输入图像描述

目前我正在制作两个xib,iPhone4 iPhone5,并在iOS6/7 Delta中使用UIViewAutoresizingFlexibleTopMargin和UIViewAutoresizingFlexibleLeftMargin以及-64.

对于内部/子视图,我通常在iOS6/7 Delta中保持UIViewAutoresizingFlexibleTopMargin和UIViewAutoresizingFlexibleLeftMargin和-64在iOS6中正常工作.

在此输入图像描述

它给出了几乎完美的结果,但有时我需要从xib(0,0)开始查看View,但有时从(64,0)开始显示Views看起来像是在运行时从View的最上边框开始.

这让我很难理解什么是设计XIB的标准方法,因此我们可以在iPhone4和iPhone5以及两个平台上使用单个XIB.

谢谢

objective-c xib ios autolayout ios7

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

我想在CFSTR中传递一个变量?

在下面的编码中,我想通过CFSTR传递变量,我该怎么办?

ABMutableMultiValueRef address = ABMultiValueCreateMutable(kABDictionaryPropertyType);
// Set up keys and values for the dictionary.

CFStringRef keys[5];

CFStringRef values[5];

keys[0] = kABPersonAddressStreetKey;

keys[1] = kABPersonAddressCityKey;

keys[2] = kABPersonAddressStateKey;

keys[3] = kABPersonAddressZIPKey;

keys[4] = kABPersonAddressCountryKey;

values[0] = CFSTR("Wiztech, 208/B Clifton Center, Karachi");

//values[0] = CFSTR(address1); I want to pass address1 which is NSString, how can I?

values[1] = CFSTR("");

values[2] = CFSTR("");

values[3] = CFSTR("");

values[4] = CFSTR("");
Run Code Online (Sandbox Code Playgroud)

iphone cfstring

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

如何将对象传递给活动?

我有两个活动,NewTransferMyOwn.java和FromAccount.java

当我从NewTransferMyOwn.java转到FromAccount.java时,我会编写如下代码

Intent i = new Intent(NewTransferMyOwn.this, FromAccount.class);
startActivityForResult(i, FROM_ACCOUNT);
Run Code Online (Sandbox Code Playgroud)

当我从FromAccount.java回到NewT​​ransferMyOwn.java时,我想传递一个完整的类Statement对象

我写代码为

Statement st = ItemArray.get(arg2);//ItemArray is ArrayList<Statement>, arg2 is int
Intent intent = new Intent(FromAccount.this,NewTransferMyOwn.class).putExtra("myCustomerObj",st);
Run Code Online (Sandbox Code Playgroud)

我在putExtra上得到如下错误,

改为'getIntExtra'

就像我一样,再次将st转换为int,这里有什么问题,如何将Statement对象传递回acitivity?

android

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