GIT GIT GIT

Yes, you should be able to do git reflog and find the SHA1 for the commit at the tip of your deleted branch, then just git checkout [sha]. And once you're at that commit, you can just git checkout -b [branchname] to recreate the branch from there.

reset git to this commit ==> git push -f

set image for button color is blue

Changing the button type to UIButtonTypeCustom did the trick

Save State App

Appdelegate:

func application(application: UIApplication, shouldSaveApplicationState coder: NSCoder) -> Bool {
return true
}

func application(application: UIApplication, shouldRestoreApplicationState coder: NSCoder) -> Bool {
flagsSaveSate = true
return true
}

Add: Thing.swift

//
// Thing.swift
// iOrder
//
// Created by mhtran on 8/3/16.
// Copyright © 2016 mhtran. All rights reserved.
//

import UIKit

Unable to Open Project

down vote
I came across this problem and my senior told me about a solution i.e:

Right click on your projectname.xcodeproj file here projectname will be the name of your project. Now after right clicked select Show Packages Contents. After that open your projectname.pbxproj file in a text editor. Now search for the line containing <<<<<<< .mine, ======= and >>>>>>> .r. For example in my case it looked liked this

main story starttag invalid element name

Glad you corrected the issue. I recently ran into the same issue. It a merge conflict and that is why Xcode is throwing that error. Within the .xib file you will see something like:

<<<<<<< HEAD

// code

=======

// code

>>>>>>> apps

How to write auto layout constraints with SnapKit in iOS

How to write auto layout constraints with SnapKit in iOS

IBM - swift

Custom URL Schemes with signin with google facebook.

scheme = url.scheme
path = url.path
query = url.query
print("Full URL \(url.absoluteString)");
print("Scheme: \(url.scheme)");
print("Query String: \(url.query)");
if(url.query != nil) {
let queryKeyValue = url.query!.componentsSeparatedByString("&");
for keyValue in queryKeyValue {
let kv = keyValue.componentsSeparatedByString("=");
if(kv.count > 1) {
print("\(kv[0]): \(kv[1])");

check email field

func isValidEmail(testStr:String) -> Bool {
let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}"
let range = testStr.rangeOfString(emailRegEx, options:.RegularExpressionSearch)
let result = range != nil ? true : false
return result
}

-Dlocal

-Dlocal

Pages

Subscribe to Trần Mạnh Hoàng RSS