Posts by iTSangar • 1,914 points
48 posts
-
0
votes1
answer390
viewsA: Populate object in Swift using data from a JSON Return
An option using open source framework is Object Mapper: import Foundation import ObjectMapper //importa o framework class Prova: Mappable // adota o protocolo { // declara as variaveis var codigo:…
-
0
votes1
answer243
viewsA: How to Create an Advertising Banner for My App ? Ionic and Angular Js
If you are referring to design tools to build banner art you can use: • Google Web Designer (specific) • Adobe Photoshop (non-specific) • Or any existing graphic creation tool you want, or search…
-
0
votes1
answer130
viewsA: How to do a requisicao using alamofire and make the following lines of code wait for the reply of the request?
In fact you can’t make findProfessions() wait for the answer asynchronous of the Alamofire to then make the return of the function. I suggest you turn the return function into Void and spend a…
-
5
votes1
answer1003
viewsA: How to create combobox in Swift?
PickerView is the native component for this type of action in iOS You can use some solutions like Collapse Tableview, or an adaptation of Uitextfield + Pickerview. An interesting solution I found…
-
1
votes1
answer105
viewsA: Error in Facebook API Return
Unbalanced calls to Begin/end Appearance Transitions for "Logintableviewcontroller" This error happens because at some point in your code you are making pushViewController more than once at the same…
-
7
votes2
answers756
viewsA: Problems with calculating "TREE OF LIFE"
Come on: Create a program, in C language, that calculates the size of the life, after a certain number of growth cycles As the statement said we will create a program that calculates the size of the…
-
1
votes1
answer348
viewsA: Payment to the user using Paypal and Swift
According to the Paypal public repository on github you cannot do operation of Pagamento(Payout) directly via the iOS SDK: The SDK Supports two use cases for making Payments - Single Payment and…
-
1
votes2
answers419
viewsA: Swift - how do I find the screen size of the user’s device?
That one extension below helps you to know which model of the device, soon you will know which screen size. public extension UIDevice { var modelName: String { var systemInfo = utsname()…
-
1
votes1
answer156
viewsA: How to ignore persistence.xml in gitignore?
You need to re-load your . gitgnore from Github: First make any changes to your code, then execute the following commands: git rm -r --cached . This removes the changed files from the index (staging…
-
1
votes2
answers340
viewsA: Swift - how to find out the size of JSON?
To iterate the JSON: let json = try NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments) as! [[String: AnyObject]] for objeto in json { // preenche os arrays com os dados do JSON…
-
1
votes2
answers159
viewsA: Global constant Swift 2
You can use structures defined in a file called Constants.swift, can thus store and access the constants of the entire app cleanly: struct Config { static let baseURL: NSURL(string:…
-
2
votes2
answers300
viewsA: Problems getting the layout right in the Xcode
As @danielbmarques said should work: • Leading and trailing at the edges • vertical centered: • selects the Constraint and adjusts the Multiplier: • expected result:…
-
1
votes1
answer85
viewsA: Label moving as digital signage
To create this effect of the label moving (so-called Marquee effect) you can use this library: https://github.com/cbpowell/MarqueeLabel-Swift If you’re using cocoapods just add pod…
-
0
votes1
answer234
viewsA: Class - pass by reference
Since these are classes, the passage is by reference, correct? Answer: Correct. Classes in Swift sane Reference Types while Structs sane Value Types. (I can explain this difference in another…
-
1
votes1
answer611
viewsA: How to load an Image into a Uitableview?
Step by step: I must perform the process of inserting these elements in the cell of the table by method cellForRowAtIndexPath? Most places where we find codes about UITableView use the method…
-
0
votes1
answer25
viewsA: Swift Coredatamodel Select
Based in that matter but in Objective-C you can do: //passe o(s) campo(s) que deseja dentro do Array request.propertiesToFetch = ["wordEasy", "wordMedium"]…
-
4
votes1
answer145
viewsA: IOS - How to make the app screen always lit?
According to the apple documentation you can use the method idleTimerDisabled: Swift UIApplication.sharedApplication().idleTimerDisabled = true Objective-C [[UIApplication sharedApplication]…
-
0
votes1
answer65
viewsA: error Swift 0_pthread_kill
Reason: 'Nsfetchrequest could not locate an Nsentitydescription for Entity name 'wordEasy'' This means that the Entity with the name has not been found wordEasy on your . xdatamodel You can try to…
-
0
votes1
answer37
viewsA: SIGABRT error in Uitableview
This error can usually occur for 2 reasons: Make sure your storyboard is added to your Copy Bundle Resources: Check the properties of your .storyboard or .xib is linked to the target of your…
-
1
votes1
answer108
viewsA: How do I activate my iTunnes Connect?
Possible problem with account access: If you’ve completed the entire process of registering an account and still have no access to team agent options, contact Apple and explain your problem through…
-
0
votes1
answer110
viewsQ: Get widget index on Swift
I’m trying to use the method index to know the index of an object within the array but do not know which parameter(s) to pass. My code: /// Struct that define the track model struct Track { let…
-
-1
votes2
answers366
viewsA: Start screen in storyboard
I don’t know what the context of your app is, but this type of navigation doesn’t seem to be very usable. Take a look at Human Interface Guide for iOS on the topic of UI Elements - Tab Bar: A tab…
-
2
votes2
answers997
viewsA: How to customize Uitableview?
I made a pull request in your repository with the solution below: Activate Size Classes in the Storyboard views. Because then we can work independent of the screen size of the user. Size Classes…
-
0
votes2
answers355
viewsA: Create 3x3 array using Imageviews - SWIFT
The @carlosfigueira comment answers your question: var matriz: [[UIImageView]] = [[UIImageView(), UIImageView(), UIImageView()], [UIImageView(), UIImageView(), UIImageView()], [UIImageView(),…
-
1
votes3
answers1491
viewsA: How to round Double values?
In Swift we can create Extensions (which is similar to the Categories of Objective-C), so we can add a new functionality to the class Double: extension Double { /// Arredonda um Double conforme…
-
1
votes2
answers948
viewsA: How to transition screens programmatically with Swift?
If you are using NavigationController: @IBAction func chamarNavigationController() { let storyBoard = UIStoryboard(name: "Main", bundle: nil) let novoNavigation =…
-
2
votes2
answers125
viewsA: How to get a return of an Array<String> in a GET call with task.resume()?
One way to do this is by passing a callback to your function: class func getDescricoes(completionHandler: (result: Array<String>) -> ()) { ... let task = session.dataTaskWithURL(url) {…
-
3
votes1
answer50
viewsA: How to configure predicate to return only 2 columns?
The class NSFetchRequest has a property called propertiesToFetch. You can use it as follows: ... [requisicao setPredicate:argumentosBusca]; [requisicao setPropertiesToFetch:[NSArray…
-
0
votes1
answer63
viewsA: Custom Like Boot
I don’t know if this is the best way, but it worked out nice here: You will need to change the facebook framework class directly, as here I installed the SDK via cocoapods i can access the folders…
-
1
votes3
answers312
viewsA: How to Configure Tab Bar Controller?
As your Tab Bar Controller will call the first screen that is connected to it automatically just by this code on viewDidLoad() from the first screen: - (void)viewDidLoad { [super viewDidLoad]; // Do…
-
3
votes1
answer971
viewsA: Layout alignment between classes - Android Studio
According to the android documentation: View.GONE This view is Invisible, and it doesn’t take any space for layout purposes. View.INVISIBLE This view is Invisible, but it still takes up space for…
-
3
votes1
answer945
viewsA: How to write mathematical symbol in android xml button?
You can use unicode codes to do this: Declare the code in your string.xml <string name="raiz"> √ </string> And in your xml screen: <Button ... android:text="@string/raiz"…
-
2
votes1
answer113
viewsA: Error trying to use Mediaplayer
public class ExecutaSomExemplo { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Conecta o button do xml Button button =…
-
10
votes2
answers5553
viewsA: Where to create the Assets folder in an android project?
In Android Studio right-click the folder and navigate to Assets Folder. On the next screen just click on Finish. This will create the folder assets at the main root of your application. Source of…
-
0
votes2
answers253
viewsA: QPX Express API - Flight list
Basically to test the QPX Express API using Curl you should follow these steps: Create a JSON file named request.json with the content you put in the question and save in a place you remember later,…
-
1
votes1
answer77
viewsA: Use modal to display a static Uitableview
Since everything is being done storyboard no secret calling the modal table static: To call a normal view as you quoted the cycle was probably this: Step 1: Step 2: Step 3: To call the view with the…
-
0
votes2
answers51
viewsQ: Optimize Nspredicate with Magicalrecord
First of all follow my model: Classes: @interface MMEAlbum : NSManagedObject ... outras propriedades @property (nonatomic, retain) NSNumber *album_upcoming; @property (nonatomic, retain) NSSet…
-
3
votes1
answer215
viewsQ: println on Swift via terminal
I’m trying to compile a class people.swift for Terminal macosx class People { let name:String = "" let age:Int = 0 init(name:String, age:Int) { self.name = name self.age = age } let anyPeople =…
-
4
votes1
answer5616
viewsA: Download USB to Motorola Drivers
I used this motorola link to download the driver and run using the Android Studio, but it’s likely to work for Eclipse also.…
-
3
votes3
answers4496
viewsA: Click and hold the Button / Listview
Button myButton = (Button) rootView.findViewById(R.id.button); myButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { …
-
3
votes3
answers1285
viewsA: Why new Alertdialog.Builder(getApplicationContext()). create() does not work?
1 - This is a problem (Bug) of Android? Apparently not: getApplicationContext() should be used if you need a context whose life cycle is separated from the current context , which is linked to the…
-
1
votes2
answers1416
viewsA: How to run commands in Android Studio?
If you are using the Android Studio in Macosx: Use the access bar to Terminal and open a new session: In the terminal navigate to the root of your project and use the commands using ./gradlew:…
-
0
votes2
answers120
viewsA: Uiactivityindicatorview does not work
From what I understand you created the ActivityIndicatorView via code, i.e., did not add the component to the .xib. In this case you need to define the frame of your object on the screen: //Por…
-
3
votes3
answers208
viewsA: Composition: use @class or #import?
My question is: when to use @class or #import? @Class: Used when we want to declare an object of any class. // File: Animal register. h @class Animal; @interface Animal register : Uiviewcontroller {…
-
0
votes2
answers5433
viewsA: How to finish layout Android App?
Step 1: For mobile apps the part of Layout has its principle in UX Design: The part where you define the experience you expect to have when the user uses the app. Step 2: After that we apply the UI…
-
18
votes2
answers389
viewsQ: Android app for tablets only
I developed an android app using Android Studio, in the archives xml of the screens I used the layout of Nexus 10 because my application is only for tablets. After I moved the app up to the Google…
-
14
votes3
answers17841
viewsA: Importing library in Android Studio
In a project I’m doing I had a certain difficulty to add Bibliotecas of the kind nay.JAR, for every version that the Android Studio IDE updates something. And the change of version 0.3.0 removed…
-
31
votes9
answers17662
viewsA: Error: R cannot be resolved
Give Clean and then Build in your project.